Today in this blog we will discuss about how to control Arduino’s built in LED through programming. Arduino is an open source electronic platform based on easy to use hardware and software.
Please support us on YouTube also. Like Share and Subscribe to our channel : https://youtube.com/c/RatnasRoboLab
Components
- Arduino Uno : https://amzn.to/3Axir6R
Code
// the setup function runs once when you press reset or power the board
void setup() {
// initialize digital pin LED_BUILTIN as an output.
pinMode(LED_BUILTIN, OUTPUT);
// the loop function runs over and over again forever
void loop() {
digitalWrite(LED_BUILTIN, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(LED_BUILTIN, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
Code to Note
pinMode(LED_BUILTIN, OUTPUT) – You have to tell ARDUINO that LED_BUILTIN is used as Output or Input. so, here we used the built in function called pinMode().
digitalWrite(LED_BUILTIN, HIGH) – When you are using LED_BUILTIN as output, you can command it to HIGH or LOW.
Result
In this program the built in LED turns ON for one sec and turn OFF for one sec. Similarly we can also reprogram the ARDUINO and change the rate at which it blinks.
Do you want to support our videos ?
https://www.buymeacoffee.com/ratnasrobolab
Support Our Channel By Shopping parts from Amazon !
Video Components
1. My Camera : https://amzn.to/3L9Nzyb
2. Camera Stand Tripod : https://amzn.to/3Lwo1gd
3. T Bulb : https://amzn.to/3AtLk43
4. Boya Mic : https://amzn.to/3HbTrGc
5. Wall mount stand for Camera and other Mounting Accessories : https://amzn.to/41GLTTR
6. Overhead phone stand : https://amzn.to/442KrwP
7. upReale Professional 11″ inch LED Ring Light with 7 Ft Tripod Stand Combo : https://amzn.to/3V8HXJa
Further Readings
If you liked this article, then please subscribe to our YouTube Channel. You can also find us on Instagram, Facebook and Twitter.
READ – CONNECT – BOOST – CREATE