diff --git a/src/ConfigurableFirmata.cpp b/src/ConfigurableFirmata.cpp index 03f3bbb..6f46656 100644 --- a/src/ConfigurableFirmata.cpp +++ b/src/ConfigurableFirmata.cpp @@ -213,6 +213,10 @@ int FirmataClass::available(void) */ void FirmataClass::processSysexMessage(void) { + if (sysexBytesRead == 0) { + return; + } + switch (storedInputData[0]) { //first byte in buffer is command case REPORT_FIRMWARE: printFirmwareVersion();