Hello everyone!
File ---> Examples---> 01.Basics---> Blink
Make sure to modify the codes to make it compatible with the hardware setup.
Read the comments beside each function, to make sure you understand how it works. If you are unable to understand it, please feel free to comment below and I will help you.
The final look of the codes:
Today, we will be starting our journey in Arduino. The first project in Arduino is Blink an LED, and today I will teach you how to do it successfully. If you are familiar with coding, you would definitely know the program: "Hello World". This is the first program every programmer learns to code. Similarly, making an LED blink is the "Hello Word" of physical computing.
Before starting this project, make sure you have read the 'Introduction' page.Supplies:
- LED
LED, short for Light Emitting Diode is a diode that emits light as current flows through it. The Arduino board has an in-built LED which can be used for debugging purposes. LEDs have polarity(remember that it is a diode) and only allow current to flow in one direction. The cathode must be connected to GND (Ground pin) and the anode must be connected to one of the digital pins.
As mentioned in the home page, you will need:
- Resistor - 220Ω
- Arduino Uno R3
- Solderless Breadboard
- Jumper wires
Setting up your hardware
Connections:
- Cathode -----> GND
- Anode -----> D9
Coding
You can find the codes for this project in:File ---> Examples---> 01.Basics---> Blink
Make sure to modify the codes to make it compatible with the hardware setup.
Read the comments beside each function, to make sure you understand how it works. If you are unable to understand it, please feel free to comment below and I will help you.
The final look of the codes:
After completing, compile your sketch by clicking on the tick button. It will verify your sketch and once it's done, upload the sketch to your Arduino board by clicking the right arrow button. Make sure you have connected the Arduino board to your computer before uploading.
Final look
If anyone has questions, please feel free to comment below or send an email to arduinoprojectsbyr@gmail.com.
Follow my blog to stay updated with my projects.
Comments
Post a Comment