summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorabel <abeltimm@protonmail.com>2022-12-08 14:23:49 +0100
committerGitHub <noreply@github.com>2022-12-08 14:23:49 +0100
commit4fe3c02c12f9d36f0eabeb6cc6a9ec18b298e46d (patch)
treee0daddb1ef4849ba5e47296fe3f8ad84b58f18da
parent0a969faa99a81e46106b5b1d9c4bca648c911289 (diff)
downloadrobotica-4fe3c02c12f9d36f0eabeb6cc6a9ec18b298e46d.tar.gz
robotica-4fe3c02c12f9d36f0eabeb6cc6a9ec18b298e46d.zip
Update arduino.ino
-rw-r--r--arduino.ino29
1 files changed, 11 insertions, 18 deletions
diff --git a/arduino.ino b/arduino.ino
index 54fa264..f328aa9 100644
--- a/arduino.ino
+++ b/arduino.ino
@@ -1,20 +1,13 @@
-// https://github.com/Seeed-Studio/Grove_I2C_Motor_Driver_v1_3/archive/master.zip
-
-
-#include <Grove_I2C_Motor_Driver.h>
-
-// default I2C address is 0x0f
-#define I2C_ADDRESS 0x0f
-
-void setup()
-{
- Motor.begin(I2C_ADDRESS);
+// 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);
}
-// Set the speed of a motor, speed is equal to duty cycle here
-void speed(unsigned char motor_id, int _speed);
-
-delay(1000);
-
-// Stop one motor
-void stop(unsigned char motor_id);
+// the loop function runs over and over again forever
+void loop() {
+ digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
+ delay(1000); // wait for a second
+ digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
+ delay(1000); // wait for a second
+}