X-Git-Url: http://git.piffa.net/web?p=rover;a=blobdiff_plain;f=prototypes%2Fmacchina%2Fraw%2Fraw.ino;fp=prototypes%2Fmacchina%2Fraw%2Fraw.ino;h=76c78c1f053f78d6168ec82a3ae7ffef2a5a4344;hp=3261b98f49d9b99af4d2e6a639ad9a10646a46ca;hb=ab995024225af895d46730bc34d758978e24f9e5;hpb=aec24e1fc4aff719b970951f624abf56da7f5f36 diff --git a/prototypes/macchina/raw/raw.ino b/prototypes/macchina/raw/raw.ino index 3261b98..76c78c1 100644 --- a/prototypes/macchina/raw/raw.ino +++ b/prototypes/macchina/raw/raw.ino @@ -13,7 +13,7 @@ Codice: http://git.andreamanni.com/web?p=rove #include "rover.h" #include "Servo.h" -int rotPausa = 1000; // Pausa per una rotazione di ~90' +int rotPausa = 200; // Pausa per una minima rotazione void setup() { @@ -27,9 +27,10 @@ void loop() // Fintanto che non ci sono ostacoli: avanti while (distanceCheck() == 0) { avanti(); + delay(50); // Movimento minimo, per stabilizzare + // l'input del sensore } -// Se c'e' un ostacolo: ferma e gira - stop(); - giraSX; +// Se c'e' un ostacolo: gira + giraDX(); delay(rotPausa); }