Skip to content

Instantly share code, notes, and snippets.

@orangecms
Created November 22, 2020 16:57
Show Gist options
  • Save orangecms/386931489c2d58eaa7e585f60dde62f5 to your computer and use it in GitHub Desktop.
Save orangecms/386931489c2d58eaa7e585f60dde62f5 to your computer and use it in GitHub Desktop.
ESP8266 NodeMCU WS2812 strip 30 LEDs RGB
#!/bin/sh
_FW=nodemcu-release-10-modules-2020-11-21-17-50-47-float.bin
wget https://nodemcu-build.com/builds/$_FW -O nodemcu.bin
#!/bin/sh
# https://nodemcu.readthedocs.io/en/latest/getting-started/#esptoolpy
esptool.py \
--port /dev/ttyUSB0 \
--baud 115200 \
write_flash \
-fm dio \
0x00000 nodemcu.bin
-- https://nodemcu.readthedocs.io/en/release/modules/ws2812/
ws2812.init()
ws2812.write(string.char(
255, 0, 255,
255, 0, 255,
255, 0, 255,
255, 0, 255,
255, 0, 0,
255, 0, 0,
255, 0, 0,
255, 0, 0,
0, 255, 255,
0, 255, 255,
0, 255, 255,
0, 255, 255,
0, 255, 0,
0, 255, 0,
0, 255, 0,
0, 255, 0,
255, 255, 0,
255, 255, 0,
255, 255, 0,
255, 255, 0,
0, 0, 255,
0, 0, 255,
0, 0, 255,
0, 0, 255,
255, 255, 255,
222, 222, 222,
200, 200, 200,
177, 177, 177,
144, 144, 144,
99, 99, 99
))
#!/bin/sh
nodemcu-tool upload init.lua
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment