Serial.write() blocks receive when written inside draw() function

Hi,

Thanks alot for the reply.

I debugged it for a while and got to understand the problem(somewhat).

When the serial.write() was inside the draw() function it was writing the port as soon as it was opened.
And I was using Arduino to simulate my Board under Test.
So as soon as port was opened, the arduino got reset and started expecting program code and got confused with my serial.write commands.
So I added a delay after I opened the port and the problem got away.
This problem wouldn’t have occurred in my actual board under test.
I should have added that I was using arduino for testing

I fixed this and many other bugs and now my GUI is working pretty great.

And about the arrays… I agree with you… I just started very small and it scaled up very much more than expected. I will do that when I start optimizing the code.It was a great learning experience for me to work on processing. It is pretty nice.

Thanks again for your guidance.

1 Like