Traditional Culture Encyclopedia - Traditional culture - How to turn an ordinary light strip into a running light

How to turn an ordinary light strip into a running light

1, prepare materials, in addition to ordinary light strip, you need an Arduino development board, a relay module, a power supply and some connecting wires.

2, connect the positive and negative poles of the ordinary light strip to the corresponding interface of the relay module, make sure the positive pole of the light strip is connected to the COM interface of the relay module, and the negative pole is connected to the NO interface of the relay module.

3. Use the connecting cable to connect the VIN connector of the relay module to the positive terminal of the power supply, connect the GND connector to the negative terminal of the power supply, and then, connect the DC connector of the relay module to the digital pins of the Arduino.

4. Using the Arduino programming software, write a simple code to control the flow effect of the light strip, you can use the delay function and the output function of the digital pins to realize the flow effect of the lights.

5, will write a good code uploaded to the Arduino development board.

6, connect the power supply, turn on the switch, you will be able to see the lights flow in accordance with the written code.