bidirectionnal communication, first milestone reached

This commit is contained in:
phyto
2019-05-14 15:46:49 +02:00
parent 565c70b54f
commit 6d597e59e8
5 changed files with 69 additions and 42 deletions

View File

@@ -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 */
}
/* -------------------------------------------------- */