Created
November 22, 2020 16:57
-
-
Save orangecms/386931489c2d58eaa7e585f60dde62f5 to your computer and use it in GitHub Desktop.
ESP8266 NodeMCU WS2812 strip 30 LEDs RGB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- 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 | |
)) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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