Iot 1
Iot 1
PRACTICAL-1
Aim: Study of Arduino board and Interfacing of LED (s) with Arduino.
Arduino Board:
Arduino is an easy-to-use open platform to create electronics projects. Arduino boards play a
vital role in creating different projects. It makes electronics accessible to non-engineers,
hobbyists, etc.
1
Internet of things[102046709] 12102080501068
1.Arduino UNO
Arduino UNO is based on an ATmega328P microcontroller. It is easy to use compared to other
boards, such as the Arduino Mega board, etc. The Arduino UNO includes 6 analog pin inputs,
14 digital pins, a USB connector, a power jack, and an ICSP (In-Circuit Serial Programming)
header.
It is the most used and of standard form from the list of all available Arduino Boards. It is also
recommended for beginners as it is easy to use.
2.Arduino Nano
The Arduino Nano is a small Arduino board based on ATmega328P or ATmega628
Microcontroller. The connectivity is the same as the Arduino UNO board. The Nano board is
defined as a sustainable, small, consistent, and flexible microcontroller board. It is small in
size compared to the UNO board. The devices required to start our projects using the
Arduino Nano board are Arduino IDE and mini USB.
The Arduino Nano includes an I/O pin set of 14 digital pins and 8 analog pins. It also includes
6 Power pins and 2 Reset pins.
3.Arduino Micro
The Arduino Micro is based on the ATmega32U4 Microcontroller. It consists of 20 sets of pins.
The 7 pins from the set are PWM (Pulse Width Modulation) pins, while 12 pins are analog
input pins. The other components on board are reset button, 16MHz crystal oscillator, ICSP
header, and a micro USB connection.
2
Internet of things[102046709] 12102080501068
The
Arduino Micro is also called as the shrunk version of Arduino Leonardo.
Components required for Practical: Arduino Uno R3, Resistor, LED, Connecting Wires
Steps:
1. In the Components panel on the right, search for "Arduino Uno" and drag it to the
workplane.
2. Click on the Arduino Uno to open the code editor.
3. Make changes in the code as per your requirements.
4. Click on the "Start Simulation" button to see the LED blink in the simulation.
Off Mode
3
Internet of things[102046709] 12102080501068
On Mode
Code:
void setup()
{
pinMode(LED_BUILTIN, OUTPUT);
}
void loop()
{
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
2. Blink External LED for designated time.
LED is off
4
Internet of things[102046709] 12102080501068
LED is On
Steps:
1. In the Components panel on the right, search for "Arduino Uno" and drag it to the
workplane.
2. Also, drag LED and resistor from the panel and drag them into workspace.
3. Connect Cathode of LED to GND.
4. Connect one leg of Resistor to Anode of LED and another leg to output pin 13.
5. Once connected, make required changes in the code and start simulation.
Code: void
setup() {
pinMode(13,OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(10000);
digitalWrite(13, LOW);
delay(1000);
}