diff options
Diffstat (limited to 'OLD/arduino.ino')
| -rw-r--r-- | OLD/arduino.ino | 164 |
1 files changed, 164 insertions, 0 deletions
diff --git a/OLD/arduino.ino b/OLD/arduino.ino new file mode 100644 index 0000000..8992f3a --- /dev/null +++ b/OLD/arduino.ino @@ -0,0 +1,164 @@ +int fullspeed() { + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(80); // wait for a second +} +int seveneightspeed() { + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW + delay(10); + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW + delay(10); + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); +} +int treefourspeed() { + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW + delay(10); + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); +} +int fiveeightspeed() { + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW + delay(10); + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); +} +int halfspeed() { + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); +} +int threeeightspeed() { + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW + delay(10); + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW + delay(10); + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); +} +int onefourspeed() { + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW + delay(10); + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW + delay(10); +} +int oneeightspeed() { + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW + delay(10); + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(10); // wait for a second + digitalWrite(LED_BUILTIN, HIGH); // turn the LED off by making the voltage LOW + delay(10); +} +int nospeed() { + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(80); // wait for a second +} + +int forward(){ + digitalWrite(12, HIGH); + digitalWrite(11, HIGH); +} +int left(){ + digitalWrite(12, LOW); + digitalWrite(11, HIGH); +} +int left(){ + digitalWrite(12, HIGH); + digitalWrite(11, LOW); +} +int back(){ + digitalWrite(12, LOW); + digitalWrite(11, LOW); +} + + +void setup() { + // initialize digital pin LED_BUILTIN as an output. + pinMode(LED_BUILTIN, OUTPUT); + pinMode(12, OUTPUT); //left + pinMode(11, OUTPUT); //richt +} + +// the loop function runs over and over again forever +void loop() { + +} |
