Skip to content

vtt-info/esp8266-micropython-cookbook

 
 

Repository files navigation

ESP8266/ESP32 MicroPython Cookbook

I publish ESP8266/ESP32 MicroPyton projects from time to time on Hackster.io. Here I have some smaller project/scripts I wrote forMicroPython, in which I tried to make the code as short as possible and only use built-in modules.

-- Alan Wang

Timer-Based Simple Web Clock on SSD1306 OLED Display

File: SimpleWebClockWithTimer.py

One of my very first MicroPython project was a Web Clock that would query a API every once in a while and display the time on a 128x64 SSD1306 OLED display.

This version uses the built-in ntptime module to update system time, and use two machine.timer to replace the while-loop. It would mess up REPL but works great, with less than 50 lines of code.

Change the SSID and PW variable to your own WiFi AP.

WS2812 NeoPixel Rainbow/Rotation Effect

File: WS2812_NeoPixelRainbow.py

This is my solution to generate rainbow colors on multiple NeoPixel leds and rotate them. It wouldn't work well if you have fewer than 3 leds.

Conway's Game of Life on SSD1306 OLED Display

File: ConwayGameOfLife_SSD1306.py

Run the simulation of Conway's Game of Life on the OLED. The rules and the size of cell matrix can both be adjusted.

About

Some simple and useful projects for MicroPython on ESP8266/ESP32

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%