Introduction
Grove - LED is designed for the beginners of Arduino/Seeeduino to monitor controls from digital ports. It can be mounted to the surface of your box or desk easily and used as pilot lamp for power or signal. Its brightness can be adjust by potentiometer.
Features
|
What we need and connection
For this tutorial we will need:
The code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | /************************************************************************* * File Name : GroveLEDDemoCode.ino * Author : Seeedteam * Version : V1.1 * Date : 18/2/2012 * Description : Demo code for Grove - LED *************************************************************************/ #define LED 2 //connect LED to digital pin2 void setup() { // initialize the digital pin2 as an output. pinMode(LED, OUTPUT); } void loop() { digitalWrite(LED, HIGH); // set the LED on delay(500); // for 500ms digitalWrite(LED, LOW); // set the LED off delay(500); } |
Download the code from here and open it with Arduino IDE.
|
|
Well done!
You have successfully completed our first Arduino Grove tutorial.
I hope you liked this, let me know in the comments.
I hope you liked this, let me know in the comments.