if (Serial.available()) {
// read the most recent byte (which will be from 0 to 255):
brightness = Serial.read();
spinning = Serial.read();
So, if there is at least one byte available, it's OK to read two bytes?
I don't think so.
if (Serial.available()) {
// read the most recent byte (which will be from 0 to 255):
brightness = Serial.read();
spinning = Serial.read();
So, if there is at least one byte available, it's OK to read two bytes?
I don't think so.