Adam Francey
New member
I want to send a command to the Teensy that is 25 bytes long, and I attempt to read it with the following simple code:
I send bytes one at a time to the Teensy with TyQt serial monitor. Upon sending the 13th byte, TyQt appears to try and upload new firmware but gets stuck at 0%. Shortly after I get the error message " Timed out while writing to '\\.\COM95' " at the bottom of TyQt's screen. Every byte after this has the same effect until I reset the Teensy. If I am using pyserial (python), then attempting to write the 13th byte locks up the write() function.
So in short, once there are 12 bytes sitting in the Teensy receiving buffer without being read, the 13th byte totally breaks the serial port until the Teensy is reset.
I have tested with multiple Teensies as well as Windows and Raspbian (Raspberry Pi).
What is happening? Is there a way to get around this without constantly reading the serial port?
Code:
void setup() {
Serial.begin(57600);
}
void loop() {
if (Serial.available()>24){
Serial.read();
}
}
I send bytes one at a time to the Teensy with TyQt serial monitor. Upon sending the 13th byte, TyQt appears to try and upload new firmware but gets stuck at 0%. Shortly after I get the error message " Timed out while writing to '\\.\COM95' " at the bottom of TyQt's screen. Every byte after this has the same effect until I reset the Teensy. If I am using pyserial (python), then attempting to write the 13th byte locks up the write() function.
So in short, once there are 12 bytes sitting in the Teensy receiving buffer without being read, the 13th byte totally breaks the serial port until the Teensy is reset.
I have tested with multiple Teensies as well as Windows and Raspbian (Raspberry Pi).
What is happening? Is there a way to get around this without constantly reading the serial port?