Authorized Online Retailers:
In this lesson we will realize the function of eight of flowing water light, from left to right, each only light one LED,reciprocating cycle.
Arduino IDE (version 1.6.4+)
You can wiring your hardware as below :
Why do I empty 0 and 1 and two interfaces? These two interfaces actually use as the board’s serial ports, TX and Rx, that is to say, if you connect led on these two interfaces, you can’t download the normal program. So, generally we will empty out, if must use the case, you need to download a good program first, and then connect the circuit.
Note:
You cannot directly connect an LED to a battery or voltage source. Firstly, because the LED has a positive and a negative lead and will not light if they are the wrong way around and secondly, an LED must be used with a resistor to limit or ‘choke’ the amount of current flowing through the LED – otherwise the LED could burn out!
If you have connected the wiring diagram, connect the OSOYOO Basic Board to your computer using the USB cable. The green power LED (labelled PWR) should go on.
Open the Arduino IDE,and choose the corresponding board type and port type for your OSOYOO Basic Board,then open the sketch or copy below code to your IDE window:
void setup() { for (int i=2; i<=9; i++) //Set the pin2~pin8 cycle output { pinMode(i,OUTPUT); } } void loop() { for (int x=2; x<=9; x++) //Each LED will flash in one second { digitalWrite(x,HIGH); delay(500); digitalWrite(x,LOW); delay(500); } }
Now, simply click the “Upload” button in the environment. Wait a few seconds – you should see the RX and TX leds on the board flashing. If the upload is successful, the message “Done uploading.” will appear in the status bar.
A few seconds after the upload finishes, you should realize the function of eight of flowing water light, from left to right, each only light one LED,reciprocating cycle. If it does, congratulations! You’ve gotten OSOYOO Basic Board up-and-running.
DownLoad Url osoyoo.com