diff options
| author | abel <abeltimm@protonmail.com> | 2022-12-08 14:33:09 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-12-08 14:33:09 +0100 |
| commit | 0cee1ef15feaca3342ed21fc50a03b8997de01cb (patch) | |
| tree | 7d240202ba5d9c4155ab04940c6ef26ce4857d31 | |
| parent | 77096ba07c582a8ed8a6fa925ca1f683ba92e199 (diff) | |
| download | robotica-0cee1ef15feaca3342ed21fc50a03b8997de01cb.tar.gz robotica-0cee1ef15feaca3342ed21fc50a03b8997de01cb.zip | |
full half or no
| -rw-r--r-- | arduino.ino | 30 |
1 files changed, 22 insertions, 8 deletions
diff --git a/arduino.ino b/arduino.ino index 80b83ab..f1fd6c1 100644 --- a/arduino.ino +++ b/arduino.ino @@ -1,11 +1,9 @@ -// the setup function runs once when you press reset or power the board -void setup() { - // initialize digital pin LED_BUILTIN as an output. - pinMode(LED_BUILTIN, OUTPUT); -} -// the loop function runs over and over again forever -void loop() { +int fullspeed() { + digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level) + delay(80); // wait for a second +} +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 @@ -21,5 +19,21 @@ void loop() { 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); + delay(10); +} +int nospeed() { + digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) + delay(80); // wait for a second +} + + + +void setup() { + // initialize digital pin LED_BUILTIN as an output. + pinMode(LED_BUILTIN, OUTPUT); +} + +// the loop function runs over and over again forever +void loop() { + } |
