Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

DLD Practice Lab-1

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 15

INTERNET OF THINGS (IOT)

DLD (SPRING 2024)


By
H.M Faisal
INTERNET OF THINGS

• Network of Physical Objects/things


• Embedded with Sensors
• Software and other technologies
• Purpose of connecting and exchanging Data
• With other devices and systems
• Over the Internet
ARDUINO (MICRO CONTROLLER)
• Arduino is an open-source electronics platform
• https://www.arduino.cc
• Latest: Arduino IDE 2.3.2 (https://www.arduino.cc/en/software)
• arduino-ide_2.3.2_Windows_64bit.exe (162MB)

• Examples:
• Arduino UNO
• Arduino Mega
• Arduino Nano
• Arduino NodeMCU
ARDUINO UNO

Name: Arduino UNO R3


(ATmega328P)
Flash Memory: 32 KB
0.5 KB used by bootloader
SRAM: 2 KB
EEPROM: 1 KB
Price: Rs. 700
Operating Voltage: 5V
Digital I/O pins: 14
PWM output pins (VDD or 0V):
6
Analog input pins: 6
ARDUINO MEGA

Name: Arduino Mega


ATMega2560
Flash Memory: 256 KB
8 KB used by bootloader
SRAM: 8 KB
EEPROM: 4 KB
Price: Rs. 1200
Operating Voltage: 5V
Total pins=
54
PWM Output pins=15
Analog Input pins= 16
ARDUINO NANO
Name: Arduino Nano
ATMega328
Flash Memory: 32 KB
(ATmega328P)
2 KB used by bootloader
SRAM: 2
KB (ATmega328P)
Price: Rs.
1200
EEPROM: 1 KB
Operating Voltage: 5V
Digital I/O pins: 22
PWM output pins: 6
ARDUINO NODE MCU
Name: Arduino Node MCU
ESP8266
32-bit RISC CPU Xtensa LX106
Flash Memory: 4
MB
SRAM:
64 KB
Price:
Rs. 1600/-
EEPROM:
1 KB
Operating Voltage: 3.3V
Digital I/O pins: 16
SINGLE CHANNEL RELAY

• NC Normally Closed


• NO Normally Open
• COM  Common terminal
DHT 21 (TEMPERATURE AND HUMIDITY
SENSOR)

• Price: Rs. 350/-


• Accuracy: +- 0.5 o C
• Temperature: -40 to 80 o C
TM1637 4 DIGIT 7 SEGMENT DISPLAY
MODULE

• Price: Rs. 300/-


• GND – GND
• Vcc – 5V
• DIO – D0
• CLK – D1
INSTALL NODE MCU BOARD

• If we want to add esp8266 wifi board then:


• Goto Aurdino File —>Preferences—>URL: (Copy paste following link)
http://arduino.esp8266.com/stable/package_esp8266com_index.json
• And press ok.
• Quit and open Arduino again.
• Then search in board manager, select esp8266 and install
LAB1: BLINK ON-BOARD LED AND
EXTERNAL LED
Components Required:
• NodeMCU
• LED Bulb (White and Red)
• Resistor 200 ohm (for red bulb 2V)
• Micro USB cable
• Bread board
• Plug Pin Jumper connecting wires (preferably one red and other black)
LAB1: BLINK ON-BOARD LED AND
EXTERNAL LED
Steps:
• Connect NodeMCU on bread board
• Connect laptop usb port with NodeMCU using micro usb cable
• Arduino->Select port (Tools>Port) [if port not selected then goto Device
Manager]
• Anode pin (+ve/longer) of the LED to the pin D7(or any pin D1-D7) of
NodeMCU.
• Cathode pin (-ve/shorter) of the LED to the any GND pin of NodeMCU.
LAB-1 CODE
//////////////////////////// List of Header Files //////////////////////////////////////////////////
//////////////////////////// List of variables and objects defined ////////////////////////////////////

#define LED D1

void setup() { // Setup function to run once

pinMode(LED, OUTPUT); //For external LED

void loop() { // loop function having main code here

digitalWrite(LED, HIGH);

delay(1000); //1000=1Sec

digitalWrite(LED, LOW);

delay(1000);

You might also like