Use WS2812B Make a Suit that Light Up
| Wayne Chen
The project is designed with Arduino Mega 2560 and UNO R3 as the development platform and WS2812B as the display element. In the whole process, you just need to control the LED strip to display different colors and states through Arduino to get the desired effect. The design of this project is very simple, but it requires a lot of welding and is suitable for all kinds of dance performances.
Things used in this project
- UNO R3 Board Atmega328P
- Mega 2560 R3 ATMEGA2560
- WS2812B SMD LED Strip 60 LED
- 9V 2A battery
- Soldering Tool
- Hot melt adhesive
WS2812B SMD LED Strip
WS2812 is a smart external control LED light source integrating control circuit and light-emitting circuit.
Symbol |
Base pin name |
Function description |
DO |
Data output |
Control data signal output |
DI |
Data input |
Control data signal input |
VCC |
VDCC |
Control circuit power supply |
VDD |
Power supply |
Power supply pin |
VSS |
Ground connection |
Signal grounding and power grounding |
1. Garment design
Fix the WS2812B SMD LED Strip to the clothes with hot glue , upper body hats, tops, and gloves are controlled by mega 2560, and lower body pants and shoes are controlled by UNO R3 and fixed with hot melt adhesive. Then connect the battery to the UNO DC port.
Note: Power supply 9v 2A, a total of 455 lights in the project.
Clothes the finished product
2. Device attachment
In the project, used pin 3 of uno. In the process of experiment, you can decide according to your own situation.
3.Download the LED driver library
https://codeload.github.com/adafruit/Adafruit_NeoPixel/zip/master
The downloaded files are placed into the "libraries" folder under the Arduino IDE installation directory.
4.Program writing
<Adafruit_NeoPixel.h> is used to drive the chip, set the flashing time interval according to requirements, the color is set by modifying the three values of RGB.
#define PIN 3 We are using Pin 3, and everyone can set it up.
int numPixel = 455; "455" is the total number of LED lamp beads, and it is better to use how much to modify according to your actual situation.
strip.setBrightness(35); "35" is the brightness of the LED. The default is 50.
CODE
- Upper body control (C/C++)
- Lower body contorl (C/C++)
5 comments to
HqbgscdYwjZmorQ
XBoNPWfvH
vObTuMsegC
dythBQorpcePEiTv
UhgyeHnBjC