Components:
4 x LED light
4 X 220Ω Resistor
1 x Arduino Uno R3
1 x Breadboard
* x Jumper Wires (* as many as you need)
4 Relay Modole
1 x 9V Battery
Connections:
Relay to Arduino
GND to GND
IN1 to pin 7
IN2 to pin 8
IN3 to pin 9
IN4 to pin 10
VCC to 5V
The positive pin in the battery goes connected to the positive power rail in the breadboard and the negative side goes to the negative side of the breadboard.
For each Relay module the COM pin will be connected to the + Power rail in the breadboard. The NO pin will be connected to the each LED anode accordingly to the light we want to control. Between each cathode pin and the - Power rail, we are going to place a 220 Ω resistor.
Code for Arduino: https://drive.google.com/drive/folders/0B4XBFvTTDF-jaDZyOEQ4NVBrUzA?usp=sharing
No comments:
Post a Comment