Grove Beginners kit: Arduino Lesson 1a Flashing LED
Using the Grove Beginner Kit for Arduino with CodeCraft to make an LED flash. Includes how-to “blocky-program” the code using CodeCraft.
|The Grove Beginner Kit For Arduino includes an Arduino Uno board with preconnected devices. The Grove lessons supporting this present coding using the Arduino IDE. These pages present the same lessons using the Codecraft IDE that uses the Block style of coding with specific Grove Arduino blocks.|
Introduction to using CodeCraft to program an Arduino device. Make an LED flash.
An LED is a Light Emitting Diode. It glows when turned on. The D4 pin on the microprocessor is connected to the LED. This lesson turns D4 repeatdly on and off making the LED flash.
The D in D4 means its a digital pin so it can either be on or off, like a switch. It outputs to the LED so is a Digital Output.
Grove Beginners Kit
Components this lesson
- Grove LED
|Component||Interface||Type||Pins or Address|
|AirPressureSensor BMP280||I2C||sensor||I2C 0x77(default)/0x76(optional)|
For these lessons, the Components are already connected through the board. That is, for this lesson, LED module is already connected to D4 on the microprocessor.
The lesson code block.
D4 is automatically set to output as it’s used with the LED.
No coding needed.
- Set D4 to Hi and so turn the LED on
- Delay for 1000ms (1 second)
- Set D4 to Lo and so turn the LED off
- Delay for 1000ms
Loop means that this part gets continuously repeated.
How to create this ...
Watch the video on Youtube:
For this lesson, The LED module will be repeatedly on for 1 second and then off for 1 second.
Go to the next lesson to see how to download the program to the board. Then come back and try the following:
LED Brightness Adjustment:**
On the Grove LED module, there is a variable resistor that can be adjusted using a screw driver. Twist it to make the LED light up brighter!
|< Prev:||C# Async Threading in Console Apps|
|This Category Links|
|Category:||Arduino Beginners Index:||Arduino Beginners|
|Next: >||Grove Beginners kit||Arduino Lesson 1b Download program to board|