YOUTUBE:
COMPONENTS REQUIRED:
PREREQUISITES:
LED:
STEP 1:
Connect the GND pin (14th pin) in Arduino to the common ground on the breadboard.
STEP 2:
Connect Anode and Cathode of the LED as shown in the figure given below.
STEP 3:
Connect Resistor’s one end to the anode of the LED as shown in the figure given below
STEP 4:
Another end of the resistor is connected to the pin1 in Arduino UNO board via wire as shown in the figure given below
STEP 5:
There are two procedures to open the code in Arduino IDE;
Procedure 1:
Copy the given code and paste in your new sketch in Arduino IDE.
Procedure 2:
Download the given code and open it in Arduino IDE.
CODING [c++]:
1 2 3 4 5 6 7 8 9 10 11 |
#define PIN_1 1 void setup() { pinMode(PIN_1, OUTPUT); } void loop() { int delayTime = 100; digitalWrite(PIN_1, HIGH); delay(delayTime); digitalWrite(PIN_1, LOW); delay(delayTime); } |
STEP 6:
Create new sketch by clicking File>>New in the menu bar in Arduino IDE
STEP 7:
After opening the download file or paste the copied file it seems to be like the below figure in Arduino IDE code Editor.after opening the file
STEP 8:
Connect your Arduino UNO to computer or laptop via USB cable. The corresponding Port will be displayed only after connecting of Arduino UNO to Laptop or Computer.
STEP 9:
The board selection in LINUX in Arduino IDE is shown below
STEP 10:
The Port selection in LINUX in from Arduino IDE after connection of Arduino UNO to Laptop or Computer is shown below
STEP 11:
Compile the code by clicking the compile button in Arduino IDE as shown in the diagram.
The message window will display as shown below after compiling the code without error successfully.
STEP 12:
Upload the code by clicking the upload button in Arduino IDE. Now the compiled code is uploaded via a selected port from Arduino IDE to the Arduino UNO board.
RESULT:
Finally, the LED is turned ON and OFF(blinking).