[TriEmbed] Arduino FreeRTOS ESP32 project - protecting timing-sensitive code

triembed at matrixwide.com triembed at matrixwide.com
Thu Jan 23 16:43:31 CST 2020


I’m working on a time and weather forecast clock based on an ESP32 and a 20x4 HD44800 LCD connected via an I2C port expander thing. I’m ‘cheating’ at the moment by splitting the display update code and the weather-fetch code into two tasks and pinning them to separate cores.

I think the right way to do this is to protect the LCD at the character-sending level with a mutex, but I dread what I may find in terms of how they have overloaded the usual Arduino print and println functions. I should probably also replace my global ‘locking’ access to the network with a mutex, since NTP and the weather updates could clash.

Anyone already do something similar to this who would like to share code?

Thanks,
Alex


More information about the TriEmbed mailing list