From: Andrea Manni Date: Mon, 3 Apr 2017 12:03:35 +0000 (+0200) Subject: Primo metodo per drive ad oggetti X-Git-Url: http://git.piffa.net/web?a=commitdiff_plain;h=d4f770ac3314d197b2563054a837093f17914dc4;p=rover Primo metodo per drive ad oggetti --- diff --git a/prototypes/motor/drive_obj/drive_obj.ino b/prototypes/motor/drive_obj/drive_obj.ino new file mode 100644 index 0000000..50b9a19 --- /dev/null +++ b/prototypes/motor/drive_obj/drive_obj.ino @@ -0,0 +1,50 @@ +/* L298n motor +Aggiunta + +Guida 2WD composta da 2 motori + +- 2 motori DC +- L298n module +- Batteria > 6v + +*/ + +#include + +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); +} +