You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In the software serial documentation of the SWread function, the description says it ways for a low, then waits half a bit before re-checking to ensure that the low was not line noise.
However, the code performs the delay after the for loop already starts:
while (digitalRead(rx));
//wait for start bit
if (digitalRead(rx) == LOW) {
delayMicroseconds(halfBit9600Delay);
Shouldn't this be something like this instead:
while (true)
{
while (digitalRead(rx));
//wait for start bit
delayMicroseconds(halfBit9600Delay);
//if still low, break loop and proceed.
if (digitalRead(rx) == LOW) { break; }
}