]> git.piffa.net Git - rover/commitdiff
Primo metodo per drive ad oggetti
authorAndrea Manni <andrea@piffa.net>
Mon, 3 Apr 2017 12:03:35 +0000 (14:03 +0200)
committerAndrea Manni <andrea@piffa.net>
Mon, 3 Apr 2017 12:03:35 +0000 (14:03 +0200)
prototypes/motor/drive_obj/drive_obj.ino [new file with mode: 0644]

diff --git a/prototypes/motor/drive_obj/drive_obj.ino b/prototypes/motor/drive_obj/drive_obj.ino
new file mode 100644 (file)
index 0000000..50b9a19
--- /dev/null
@@ -0,0 +1,50 @@
+/* L298n motor
+Aggiunta
+
+Guida 2WD composta da 2 motori
+
+- 2 motori DC
+- L298n module
+- Batteria > 6v
+
+*/
+
+#include <rover.h>
+
+void setup() {
+//    abilita();
+}
+
+car macchina ;
+
+void loop() {
+//// Avanti
+    macchina.avanti();
+//    digitalWrite(in1,LOW);
+//    digitalWrite(in2,HIGH);
+//    digitalWrite(enA,HIGH);
+    delay(2000);
+//// Stop
+//    car.stop();
+//    delay(1000);
+//
+//// TurnSX
+//    car.giraSX();
+//    delay(1000);
+//
+//// Indietro
+//    car.indietro();
+//    delay(2000);
+//// Stop
+//    car.stop();
+//    delay(1000);
+//
+//// TurnDX
+//    car.giraDX();
+//    delay(1000);
+//
+//// Stop
+//    car.stop();
+//    delay(1000);
+}
+