Andrew
Published © GPL3+

NodeMCU Tilt-Controlled Distributed LED Lights

Who wouldn't love to effortlessly control the color of LED lights with the flick of their wrist? Well, I'm having fun!

IntermediateFull instructions provided10 hours1,082

Things used in this project

Hardware components

NodeMCU
×3
Raspberry Pi 3 Model B
Raspberry Pi 3 Model B
×1
WS2812B LED 1-meter Light Strip
You can do this however you like, each strip takes about 3 Amps of Current. I used a 10 Amp power supply to power 3 light strips. You can scale however you like.
×6
Adafruit LIS3DH Triple-Axis Accelerometer
This needs to be soldered to pins
×1
0.96 OLED Display
×1
5 Volt power adapter 10Amps
Included is a 5-volt barrel jack that we can connect to the lights
×2
Jumper wires (generic)
Jumper wires (generic)
×1
Breadboard (generic)
Breadboard (generic)
×3

Software apps and online services

Visual Studio Code Extension for Arduino
Microsoft Visual Studio Code Extension for Arduino
Rather than using the Arduino extension, I used platformio (https://platformio.org/) to help build/deploy process

Hand tools and fabrication machines

Soldering iron (generic)
Soldering iron (generic)
Screwdriver
You'll want this for connecting the PWR and GND of the LED Light Strips to the 5V Barrel Adapter for power.

Story

Read more

Schematics

Light-Remote Hardware Connections

Light-Node Hardware Connections

I had difficultly finding the light strip in Fritizing so the wire attachments to the light strip are not coordinated with any connections in particular. The LED lights come with a 3 prong connector where you can insert the Data, VIN, and GND. The 5-Volt barrel connector has a connection directly to a VIN and GND line.

Light-Remote Hardware Connections - PNG

This is the same diagram as the fritzing attachment, but in a PNG

Light-Node Hardware Connections - PNG

This is the same diagram as the fritzing attachment, but in a PNG

Architecture Diagram

Here's how the light-remote communicates to the light-nodes via the MQTT broker

Code

Tilt-Controlled-Distributed-LED-Lights Github Repository

Here is the repository for the light-remote code and the light-node code

Credits

Andrew

Andrew

1 project • 2 followers

Comments