using sprintf on Arduino

This commit is contained in:
Tonton Th 2019-01-28 15:00:33 +01:00
parent 15c6cbd8ae
commit 1e2a5e9f31

View File

@ -36,13 +36,12 @@ void updatevalues(void)
void sendvalues(void) void sendvalues(void)
{ {
int foo; int foo;
char ligne[100];
Serial.print("X"); sprintf(ligne, "X %d %d %d %d",
for (foo=0; foo<NBVAL; foo++) { values[0], values[1],values[2],values[3]);
Serial.print(" ");
Serial.print(values[foo]); Serial.println(ligne);
}
Serial.print("\n");
} }
/* -------------------------------------------------- */ /* -------------------------------------------------- */