bidirectionnal communication, first milestone reached
This commit is contained in:
@@ -10,6 +10,9 @@
|
||||
#define RELAIS_FRIGO 42
|
||||
#define RELAIS_VENTILO 40
|
||||
|
||||
#define prt(a) Serial.print(a)
|
||||
#define prtln(a) Serial.println(a)
|
||||
|
||||
|
||||
typedef struct {
|
||||
unsigned short magic;
|
||||
@@ -73,9 +76,7 @@ void updatevalues(short *ptr)
|
||||
delay(50);
|
||||
}
|
||||
}
|
||||
|
||||
for (foo=0; foo<NBVAL; foo++) { ptr[foo] /= NB_PASSE; }
|
||||
|
||||
digitalWrite(LED_BUILTIN, LOW);
|
||||
}
|
||||
/* -------------------------------------------------- */
|
||||
@@ -125,13 +126,13 @@ void loop() {
|
||||
controle_frigo(0);
|
||||
break;
|
||||
default:
|
||||
Serial.print("M bad control code");
|
||||
prtln("M bad control code");
|
||||
break;
|
||||
}
|
||||
}
|
||||
delay(DELAI);
|
||||
|
||||
/* ETERNEL LOOP HERE */
|
||||
/* ETERNAL LOOP END HERE */
|
||||
}
|
||||
|
||||
/* -------------------------------------------------- */
|
||||
|
||||
Reference in New Issue
Block a user