X-Git-Url: http://git.piffa.net/web?a=blobdiff_plain;f=aerei%2Fantonino%2Fbugatti_fsm%2Fbugatti_fsm.ino;h=b977036aaf4e6f30f7ef9db224d2837cb4c78e16;hb=HEAD;hp=5099f7f0635002a44bbc19e53a97e38a7ce595ca;hpb=9f5e79fda4d0dcdfd222d3f2fefcef31cd49b504;p=aerei diff --git a/aerei/antonino/bugatti_fsm/bugatti_fsm.ino b/aerei/antonino/bugatti_fsm/bugatti_fsm.ino index 5099f7f..b977036 100644 --- a/aerei/antonino/bugatti_fsm/bugatti_fsm.ino +++ b/aerei/antonino/bugatti_fsm/bugatti_fsm.ino @@ -10,7 +10,7 @@ Inputs: Lettura alettoni con interrupt 0 (PIN2) TODO: -* Cambiare il PIN del throttle su A5 da A3 +* Cambiare il PIN del throttle su A2 da A3 * attaccare il canale degli alettoni al pin2 * guardare che tipo di RGB e', anodo o cat * a full throttle RGB fa un Rand, vedere che non vada in conflitto con la sec FSM @@ -18,7 +18,7 @@ TODO: */ #include -#define dEBUG +#define DEBUG // LED disponibili Lampeggiatore left = 7; @@ -26,7 +26,7 @@ Lampeggiatore right = 8; Pwm motore = 3; // RGB -RGBLed ailerons(6,5,9); +RGBLed ailerons(6,5,9,255); // Transizione: lampeggiatori sui PIN RGB Lampeggiatore sxLamp(5); // Lampeggiatore Lampeggiatore dxLamp(9); // Lampeggiatore @@ -37,7 +37,7 @@ RGBLed ailerons(6,5,9); // Var thr //////////////// !!!! cambiare thrIn -const byte thrPin = A5; // PIN collegato al CH3 +const byte thrPin = A2; // PIN collegato al CH3 byte thr ; // Throttle a 8bit int thrIn ; // Valore del th in ingresso dal servo @@ -47,10 +47,9 @@ volatile unsigned int chStart2 = 1500; // Inizio rilevamento // Variabili per autocalibrazione 0 const byte chPin2 = 2; // PIN per la calibrazione -int mid_point2 = 1500; // Vars Alettoni -int mid_point = 1560 ; // centro del segnale, trimmato nel setup +int mid_point = 1452 ; // centro del segnale, trimmato nel setup const int deviation = 50 ; // deviazione dal punto medio //per entrare nello stato successivo dal centro @@ -91,7 +90,7 @@ void setup() { delay(4000); -mid_point = calibraTrim(chPin2) + 8 ; // + LED di servizio per monitor calibrazione +//mid_point = calibraTrim(chPin2) + 8 ; // + LED di servizio per monitor calibrazione #ifdef DEBUG Serial.begin(9600); #endif