summaryrefslogtreecommitdiff
path: root/arduino.ino
diff options
context:
space:
mode:
authorabel <abeltimm@protonmail.com>2022-12-08 15:33:38 +0100
committerGitHub <noreply@github.com>2022-12-08 15:33:38 +0100
commitede28be1c0622443def9e924a85206a55753163b (patch)
treef1618ec48fd9d794288d724cff4de075e21bca56 /arduino.ino
parent5871857d014c987132937daf8ab02a0306328a2e (diff)
downloadrobotica-ede28be1c0622443def9e924a85206a55753163b.tar.gz
robotica-ede28be1c0622443def9e924a85206a55753163b.zip
didvthing
Diffstat (limited to 'arduino.ino')
-rw-r--r--arduino.ino19
1 files changed, 18 insertions, 1 deletions
diff --git a/arduino.ino b/arduino.ino
index 9941be7..8992f3a 100644
--- a/arduino.ino
+++ b/arduino.ino
@@ -1,4 +1,3 @@
-
int fullspeed() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(80); // wait for a second
@@ -134,11 +133,29 @@ int nospeed() {
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