]> git.piffa.net Git - aerei/blobdiff - aerei/daniele/prototipo/prototipo.ino
Merge branch 'master' of kim.andreamanni.com:/home/git/aerei
[aerei] / aerei / daniele / prototipo / prototipo.ino
index 7e4b2941a4a50e40b30a4e8271baff4399e9a2f1..dffeaa52be622c7599df2e3f3847070d1c10e637 100644 (file)
@@ -1,10 +1,10 @@
 /* Aereo di Daniele
 
-Prototipo:
+Prototipo: F8 Bearcat
 
 Output:
-   2 LED ai lati con lampeggio alternato
-   1 LED PWM per motore
+   2 LED PWM ai lati con lampeggio alternato
+   2 LED PWM alle estremita ali
 
 Input:
     2 interrupts per th e alettone
@@ -22,9 +22,15 @@ Input:
 # define DEBUG
 
 // Instanziamo un LED fuori dal loop
-Lampeggiatore left = 5;
-Lampeggiatore right = 6;
-Lampeggiatore coda = 9;
+Lampeggiatore left = 6;
+Lampeggiatore right = 9;
+Lampeggiatore codasx = 5;
+Lampeggiatore codadx = 10;
+
+//Pwm pleft = 6;
+//Pwm pright = 9;
+//Pwm pcodasx = 5;
+//Pwm pcodadx = 10;
 
 // Variabili per interrupt 0 si PIN 2
 volatile unsigned int chValue2 = 1500; // Valore computato
@@ -46,6 +52,8 @@ int mid_point3 = 1000;
 void setup() {
   // I PINs vengono impostati dal constructor al momento
   // della dichiarazione dell'ogetto.
+right.Invert();
+codadx.Invert();
 
   // HI -> LOW --> LOW -> HI
   // per avere 2 LED che lampeggiano alternativamente
@@ -60,6 +68,10 @@ Serial.begin(9600);
 }
 
 void loop() {
+left.Blink(300);
+right.Blink(300);
+codasx.Blink();
+codadx.Blink();
 
 #ifdef DEBUG
     Serial.print("PIN2: ");