Simple control of neopixel lights using MQTT protocol. Get the device online and witness folks turning their lights on and off on your device.
- Button publishes MQTT message
- Light 1 responds to button clicks
- Light 2 responds to MQTT messages
Not included: A broker, we lean on HiveMQ's public broker. So anyone can see your messages, and subscribe to anyone elses.
- Pico PI
- NeoPixels
- Switch
- Wires
- Bent the pins on the PI to reduce required wiring
- Wires can go to any kind of (normally open) button/switch
- Flash micropython firmware (plug it in and drag/drop this file to it) : After doing this I see the device as /dev/ttyACM2 on my system (ubuntu 22), yours will probably be different
- Install
umqtt
on pico (multple ways to do this... here is one)ampy -p /dev/ttyACM2 put install_libraries.py main.py
- Turn it off and back on again
- Upload code using apmy
ampy -p /dev/ttyACM2 put wifi.py
ampy -p /dev/ttyACM2 put main.py
- Turn it off and back on again
- Press your button