forked from mohr/ArduinoIO
with data check befor write to serial
This commit is contained in:
parent
3141c7a858
commit
39c171c186
6
main.cpp
6
main.cpp
@ -43,6 +43,12 @@ void sendData(uint8_t *data, size_t len) {
|
|||||||
if (result != HasReturnvaluesIF::RETURN_OK) {
|
if (result != HasReturnvaluesIF::RETURN_OK) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
for (size_t i = 0; i < writtenLen; i++)
|
||||||
|
{
|
||||||
|
Serial.print("buffer is: ");Serial.println(buffer[i]);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
Serial.write(buffer, writtenLen);
|
Serial.write(buffer, writtenLen);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user