Tuesday, 23 June 2020

M5Atom Binary Clock

Finally received M5's latest tiny ESP32 module (it was way delayed due to the virus). Tried some demos, the LedDisplay demo doesn't work unless you change as per this advice:

"change in LED_DisPlay.ccp line 103
// xSemaphoreTake(_xSemaphore, portMAX_DELAY);
xSemaphoreTake(_xSemaphore, 100);" 


from ririfonfon on the M5Stack/M5Atom forum.

And then, a binary clock based on SimpleTime from the ESP32 examples, gets the time from NTP and displays on the M5Atom's leds.

The M5Atom set up uses the FastLed library but for some reason the colours work strange if you use the defined colour constants eg, if you use "CRGB::Red" the led lights green and vice-versa .

The fifth column is the seconds/2 in binary. The hours and minutes are BCD.

It does need a daylight savings check added.

the code is here

No comments: