Do It Yourself IoT
Do It Yourself IoT
Tag(ip address)
IOT Architecture
IoT Devices
Raspberry Pi, Arduino and Intel Galileo
Arduino Mega
Arduino Uno
Arduino Nano
Arduino Lilypad
Software environment
• Cross Compiler
• Debugger
• Simulator
• Programmer
Arduino consists of two microcontroller
Firmware
Two types of code executing on a simple
microcontroller:
1. Application code:
Executes the system's main functionality
We write this code
2. Firmware
Low-level code: supports the main
function
USB interface, power modes, reset. etc.
The distinction is a matter of perspective
Arduino IDE
Arduino shield
Color LCD shield:
Interface to display
• Add-on boards that interface with another I/O Device
device/IC
• Can be stacked directly on top of the
Synthesizer shield:
Arduino Generate music
Connect to speaker
Tincarcad
Ethernet Shield Library Example
Strings are converted to ASCII and sent using UART Serial monitor interpret bytes
as ASCII
Arduino Mega example:
// Arduino Mega using all four of its
Serial ports
// (Serial, Serial1, Serial2, Serial3),
// with different baud rates:
void setup() {
Serial.begin(9600);
Serial1.begin(38400);
Serial2.begin(19200);
Serial3.begin(4800);
Serial.println("Hello Computer");
Serial1.println("Hello Serial 1");
Serial2.println("Hello Serial 2");
Serial3.println("Hello Serial 3");
}
void loop() {}
Fritzing
• It is free to use (although a donation is
appreciated).
• It is simple and intuitive.
• Fritzing includes many libraries of
components from popular suppliers
such as Adafruit, Sparkfun, and
Snootlabs.
• It is suitable for Arduino, Raspberry Pi,
Beaglebone, and Spark Core projects.
• Fritzing is an integrated printed circuit
board (PCB) production service. Or
export the files and use another service.
Breadboard view
Schematic view
PCB view
Idea
Breadboard Prototype
Simulation
PCB prototype
Product design
Manufacture
Resistor colour code
Black 0
Brown 1
Red 2
Orange 3
Yellow 4
Green 5 Multiplier
Digit 1 Tolerance
Digit 2
Blue 6
Violet 7
Gray 8
White 9
Gold 0.1
Silver 0.01
Assignment1
Your job is to install the Arduino IDE on your computer, compile the "Blink" example, upload the example to
the board, and ensure that the LED blinks. Turn in 2 screen shots of the Arduino IDE. The first screen shot
should show the "Done compiling" message & the byte number information in the message area. The second
screen shot should show the message area after successfully uploading the sketch.
void setup()
{
pinMode(13, OUTPUT);
}
void loop()
{
digitalWrite(13, HIGH);
delay(1000); // Wait for 1000 millisecond(s)
digitalWrite(13, LOW);
delay(1000); // Wait for 1000 millisecond(s)
}
void setup()
void loop()
{
//read the state of the pushbutton
buttonState=digitalRead(2);
if(buttonState==HIGH)
{
digitalWrite(13, HIGH);
}
else
{
digitalWrite(13, LOW);
}
delay(10);
}
Assignment 5:Design a security Alarm using PIR sensor
Assignment 6:Alternate blink circuit
Assignment7: LED Chaser
Assignment 8: Visualizing Random number
generation
Assignment 9: Traffic Light
Design the schematic diagram of a traffic light system in
Tincarcad. Whare red, yellow and green light will blink
respectively after every 5 seconds. Write the code for the
same and show the output.
Assignment 10:Turn On LED via Web through ESP8266 with Arduino
ESP8266 HTML WEB SERVER.
Assignment 11: Design a PIR sensor based counter system
Assignment 12: Design an ultrasonic sensor based radar
Thank You
For any query
9477240461
[email protected]
Compile and Link
• avr-gcc is invoked to cross-compile the code
o Resulting code executes on AVR, not Intel
• Generates an object file (.o)
• avr-objcopy is invoked to change the format of the executable file
• A.hex file is generated from the .elf file
•