I ran across The "do not be alarmed" clock on HackerNews and thought that would be a fun little project to play around with. It's been an awful long time since I've done anything with hardware and I haven't played with anything "Arduino" yet so I made my way over to Amazon and picked up:
- NodeMcu Mini D1 (WeMos D1 Mini) x5
- OLED 128x64 SSD1306 I2C Self-Luminous Display
- ELEGOO Electronic Fun Kit Bundle
The only thing that has come in the mail thus far was the immediately useful thing, the Mini D1 board. Getting that to work on my MacOS (running BigSur) wasn't uneventful but as far as these things go it was relatively easy.
First, download and install the Arduino IDE for MacOS.
So far, so good.
Second, Download and install the WeMos D1 Mini Drivers
MacOS is going to complain that it blocked an extension from being installed. I went down a long rabbit trail here worried that something wasn't installed. If you do some digging you'll find a
ReadMe.PDF with the driver download that mentions usbserial.kext in
It seems like the extension was installed in
Library/Extensions and wasn't in
/System/Library/Extensions. Don't worry though, it turns out that it doesn't matter and things will just work. Don't waste time, like I did, trying to get the
.kext into the System directory. I didn't have much luck but I think I probably needed to disable the System Integrity Protection. Meh.
Third, setup your Arduino IDE to work with the ESP8266:
Add the following URL to Arduino -> Preferences -> Additional Board Manager URLs:
Fourth, install the ESP8266 "board" using Tools -> Board: -> Board Manager. Search for "ESP8266" (you might need to do this a couple times) and then a single entry should pop up called "esp8266" by "ESP8266 Community".
Fifth, we need to do some patching to some random ESP8266 python code.
Comment out lines 29 and 30 and add the following afterwards:
iokit = ctypes.cdll.LoadLibrary('/System/Library/Frameworks/IOKit.framework/IOKit') cf = ctypes.cdll.LoadLibrary('/System/Library/Frameworks/CoreFoundation.framework/CoreFoundation')
Finally, you can test your board by loading the Blink example sketch via File -> Examples -> ESP8266 -> Blink. Click the right arrow near the top left and your ESP8266 board should start blinking after a few moments.