]> git.piffa.net Git - aerei/blobdiff - zeta_full_1/zeta_full_1.ino
zeta blink with throttle
[aerei] / zeta_full_1 / zeta_full_1.ino
index 768c772a537ff8bfd352dd2b1cbea6a38bc09a4a..5a2e75229aabb207baa4fa4ea1e61f1a56cf5b5a 100644 (file)
@@ -25,15 +25,16 @@ void setup() {
 }
 
 void loop() {
-  // Due LED con lampeggio alternato:
-  right.Blink();
-  left.Blink();
+
   thrIn = pulseIn(thrPin, HIGH, 25000);
-  thr = constrain(map(thrIn, 983, 2000, 0, 255),0,255) ;
+  thr = constrain(map(thrIn, 983, 2000, 0, 255), 0, 255) ;
+  // Due LED con lampeggio alternato:
+  right.Blink(1630 - 6 * thr );
+  left.Blink(1630 - 6 * thr );
   analogWrite(rtail, thr);
   analogWrite(ltail, thr);
   Serial.println(thrIn);
   Serial.print("\t thr:");
   Serial.println(thr);
-  
+
 }