JeremyCook
JeremyCook
DIIDevHeads IoT Integration Server
Created by techielew on 7/27/2024 in #💼-jobs
In Search of an x86/Assembly Dev to Help with Product Reviews
Not sure I'd be the best person for x86 boards, but you're familiar with my skillset @techielew , so if there's anything I can help you with just ask!
3 replies
DIIDevHeads IoT Integration Server
Created by JeremyCook on 8/8/2024 in #💬-general-dev-chat
arduino-experiments/UART/arduino-cascade...
To follow up on this problem (as I have it solved, or at least working), it seems you have to get rid of the information in the serial buffer so that the Serial.available bit won't interfere with things. I'm still not 100% though. I used Serial.end(), then Serial.begin(9600) to clear things out then reestablish the connection. Using Serial.flush() didn't work, which I thought was what that was for, but again I may be misunderstanding the mechanism. Anyway, I updated my code on GitHub, and the important bit is:
//Serial.flush(); did not work, used end/begin below
Serial.end();
Serial.begin(9600);
//Serial.flush(); did not work, used end/begin below
Serial.end();
Serial.begin(9600);
This was instructive: https://forum.arduino.cc/t/clearing-serial-buffer-solved/227853
1 replies