I was recently awoken from the Netflix-induced lethargy by an email from LukeW, who needed help with running the Wise Clock 4
. What a great idea that is!
I had an epiphany when I realized what a great development board this is: unbelievable price (about $10 on amazon), great performance (memory, speed, WiFi, BT, BLE etc.), amazing support (Arduino IDE, libraries, examples etc.).
The latest Arduino IDE I had was version 1.6.7 (2017). Trying to install the support package for ESP32, I got a security error along the lines:
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed:
sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target.
It works fine when downloading it through the browser (https://dl.espressif.com/dl/esptool-2.6.1-windows.zip
), meaning that the server certificate used for esspressif is not recognized by the JVM run by Arduino (folder "java" in the arduino directory). Identifying and adding the certificate to the JVM's keystore is time consuming, so I decided that it is just easier to upgrade to the latest Arduino IDE (currently 1.8.12), installed this time (a first for me) from Microsoft store. Even though the process is seamless, I have no idea where this software was placed (definitely not where I wanted it). I also learned the new way (where have I been for so long?) used for including and managing libraries ("Add .ZIP library").
Using the ESP32 module is as easy as the first Arduino (Duemilanove). The only thing one needs is a solderless breadboard, which I was lucky to have one around, since I don't remember ever using one before. An interesting fact is that the ESP32 board inserted in the breadboard I have, leaves room for connecting wires only on one side.
Next step was to connect the Sure 32x16 displays (two, daisy chained). I used these pins:
// pins used to connect to ESP32;
// Data pin (pin 7 of display connector)
// Chip Select (pin 1 of display connector)
#define HT1632_WRCLK 13
// Write clock pin (pin 5 of display connector)
// clock pin (pin 2 of display connector)
With only the pin changes, the HT1632 files used in Wise Clock 4
software work perfectly fine with ESP32. They can be found here
, called from a test sketch that uses 2 displays (#define NUM_DISPLAYS 2 in file MyHT1632.h).
SD card should be next, using the ESP32 support libraries. With ESP32, the sky is the limit: hopefully no more program memory limitations, no need for third party libraries (e.g. Sanguino), better support for sound, easier access to WiFi, support for extra peripherals etc.