To do so, here is the oscilloscope clock. The code is written to get a clear image of a clock with no ghost lines. The hands are drawn beginning from the origin and back to the origin. Strokes are drawn during drawing the circle.
The ESP32 has two DAC with 8 Bit and the possibility to get the time over Internet, but it is not quick enough to use mathematical functions. It was necessary to create tables for the circle and the hands. I had even to reduce the points of the circle to 180 to get a stable non flickering image.
I use the Wemos Lolin32. I tested with the light, the original and the pro version. The ESP32-PICO-Kit from Elektor didn't work with the newest Arduino (1.8.5).
The Lolin32 don't need additional components for thos project.
More infos on http://weigu.lu/microcontroller/osciclock
- Labs project
- Osciclock_ESP32 (3.66 KB )Arduino file