App hang when when writing fast on ofSerial

I’m using writeByte() to send a couple of bytes to an Arduino micro. After a random set of time the app hangs, or slows down to a halt. I’m sending 3 bytes every 100th ms to an empty Arduino.

From my debugging it seems like it has to to with the total amount of bytes I’ve written. It seems to freeze just before I’ve reached 1000 bytes.

What could be wrong?

Edit: Not unique to openFrameworks. Tried it in pure data as well and it breaks after 1000 bytes with “error is 35”.


Hi, serial communication has a defined speed, thus how many bytes you can send per seccond. Maybe you are sending more bytes per second than what the arduino can receive, and since probably ofSerial does not want to discard the unsent part of your data it will keep these until it is able to send, but then the amount of unsent data will only increment making the app slow as you mentioned.

Hi! I havent found out why that arduino didnt work yet. Changed to an esp8266 and it worked with no problems so I think this issue is more of a hardware problem on the arduino end.