In this lesson we will use Arduino to drive 4 LEDs and make a running LED light row.
Plug OSOYOO Magic I/O Shield v1.1 into OSOYOO UNO Board as the picture show:
Then you can wire plug your LEDs as below :
You should NOT connect a normal LED between 5V and GND pins in Arduino without a resistance. First, This will cause too much current passing through LED and burn it out. Second, the LED polarity is wrongly connected(i.e Positive Pin connected to GND pin) will also damage the LED.
To solve such problem. we designed OSOYOO LED module which has a build-in resistance to limit the current and fixed polarity socket to avoid these mistakes. In this project, we will use OSOYOO LED module.
After you have connected LED to Magic I/O shield as per above wiring diagram , please do graphic programming as per following instructions:
Repeat above operations (or just right click to duplicate the blocks), and define PIN 3, PIN 4 and PIN 5, just remember to change the parameter, the whole program blocks are as following:
Click Save after all the program blocks are installed. Select correct board type and serial port , then click upload.
Now, you should see four LEDs lighting one by one as per following video, this whole process will repeat until the circuit is powered off.
DownLoad Url osoyoo.com