September 2019 Update

New! We're moving to the new forum!

ALL new Blog posts will be on the forum.

Please join us there.

This Blog will no longer be updated...

Monday, August 26, 2019

OLED Display messes up my serial comms

If I try to update the display while receiving data from the ESP8266 on the hardware serial port, it drops incoming characters, so my CRC check fails, and it has to resend the data. That's not really a problem, since it will resend, but I hate knowing there's an issue...

I was updating the display every second since I display the time on it, with seconds... 

My first thought was I just needed a flag to check to see if it was safe to update the screen, and it just so happens that I have two flags I set while reading data from the serial port, so I know if I'm reading a tag or data.  By checking these two flags I can decide whether to continue and update the display. 

I figured if there was that much overhead in the display updates that it would cause an issue reading the serial port, I really don't need to update it every second. It would be nice if I'm standing there looking at it, but out of an entire day, I'll be lucky if I look at it at all, and certainly won't be to see the time...

I've changed it to update every 10 seconds now, and I'm going to remove the clock display.  I'm thinking of trying to display something related to the sensor readings... it would be nice to just glance at the screen and know if anything needs watering, or a temperature is off...

This won't be a high priority, but I'll work on that when I get stuck or frustrated with something else.

No comments:

Post a Comment

Any comments deemed off topic or offensive will be removed