using sprintf on Arduino

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

View File

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