Iot Rec Finalized
Iot Rec Finalized
: 01
8051 ASSEMBLY LANGUAGE EXPERIMENT USING SIMULATOR
DATE:
AIM:
APPARATUS REQUIRED
PROCEDURE:
Step 1 : Create a new project in Keil µ Vision & Select the device AT89C51.
Step 2 : Add the code to a new C file in the project & Save it as .asm file
Step 3 : Debug the Code using Debug → Start / Stop Debug Session.
Step 4 : Stop the Program.
PROGRAM:
ORG
0000H
CLR C
MOV A, #20H
ADD A, #21H
MOV R0, A
END
RESULT:
AIM:
To write and execute an Assembly language program to transfer data between registers and
memory.
APPARATUS REQUIRED
PROCEDURE:
Step 1 : Create a new project in Keil µ Vision & Select the device AT89C51.
Step 2 : Add the code to a new C file in the project & Save it as .asm file
Step 3 : Debug the Code using Debug → Start / Stop Debug Session.
Step 4 : Stop the Program.
PROGRAM:
ORG 0000H
CLR C
MOV @R1, A
INC R0
INC R1
END
Thus, Assembly language program to transfer data between registers and memory is written and
executed successfully.
AIM:
To write and execute the ALU program using the Keil simulator.
APPARATUS REQUIRED
PROCEDURE:
Step 1 : Create a new project in Keil µ Vision & Select the device AT89C51.
Step 2 : Add the code to a new C file in the project & Save it as .asm file
Step 3 : Debug the Code using Debug → Start / Stop Debug Session.
Step 4 : Stop the Program.
THEORY
An arithmetic-logic unit is the part of a central processing unit that carries out arithmetic and
logic operations on the operands in computer instruction words. In some processors, the ALU is divided
into two units: an arithmetic unit (AU) and a logic unit (LU). Some processors contain more than one
AU -- for example, one for fixed-point operations and another for floating-point operations.
Typically, the ALU has direct input and output access to the processor controller, main memory
(random access memory or RAM in a personal computer) and input/output devices. Inputs and outputs
flow along an electronic path that is called a bus. The input consists of an instruction word, sometimes
called a machine instruction word, that contains an operation code or "opcode," one or more operands
and sometimes a format code. The operation code tells the ALU what operation to perform and the
operands are used in the operation.
ADDITION PROGRAM:
MAIN:
MOV A, #25H
MOV B, #10H
ADD A, B
MOV R0, A
END
OUTPUT:
MAIN:
MOV A, #25H
MOV B, #10H
SUBB A, B
MOV R0, A
END
OUTPUT:
MAIN:
MOV A, #2H
MOV B, #4H
MUL AB
MOV R0, A
END
OUTPUT:
MAIN:
MOV A, #48H
MOV B, #4H
DIV AB
MOV R0, A
END
OUTPUT:
MAIN:
MOV A, #25H
MOV B, #15H
ORL A, B
MOV 47H, A
END
OUTPUT
MAIN:
MOV A, #45H
MOV B, #67H
XRL A, B
MOV 48H, A
END
OUTPUT:
APPARATUS REQUIRED
PROCEDURE:
Step 1 : Create a new project in Keil µ Vision & Select the device AT89C51.
Step 2 : Add the code to a new C file in the project & Save it as .asm file
Step 3 : Debug the Code using Debug → Start / Stop Debug Session.
Step 4 : Stop the Program.
PROGRAM:
#include<REG51.H>
unsigned char a, b;
void main()
{
a=0x10;
b=0x04;
P0=a-b;
P1=a+b;
P2=a*b;
P3=a/b;
while(1);
}
OUTPUT:
AIM:
To study the basics of Arduino Uno board and Arduino IDE 2.0 software.
INTRODUCTION TO ARDUINO:
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 miniUSB.
The Arduino Nano includes an I/O pin set of 14 digital pins and 8 analogue pins. It also includes 6 Power
pins and 2 Reset pins.
3) Arduino Mega
The Arduino Mega is based on the ATmega2560 Microcontroller. The ATmega2560 is an 8-bit
microcontroller. We need a simple USB cable to connect to the computer and the AC to DC adapter
or battery to get started with it. It has the advantage of working with more memory space. The
Arduino Mega includes 54 I/O digital pins and 16 Analogue Input/Output (I/O), ICSP header, a reset
button, 4 UART (Universal Asynchronous Receiver/Transmitter) ports, USB connection, and a
power jack.
5) Arduino Leonardo
The basic specification of the Arduino Leonardo is the same as the Arduino Micro. It is also based
on the ATmega32U4 Microcontroller. The components present on the board are 20 analogue and
digital pins, a reset button, a 16MHz crystal oscillator, an ICSP header, and a micro USB connection.
DIGITAL WRITE:
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}
CIRCUIT DIAGRAM
RESULT:
Thus the study of Arduino UNO board and Arduino IDE platform is done successfully.
AIM:
To Explore different communication methods with IoT devices (Zigbee, GSM, Bluetooth).
IoT devices require reliable and efficient communication methods to transmit data and interact
with other devices or systems. Here are three commonly used communication methods for IoT devices:
Zigbee:
GSM is a widely used cellular network technology that enables IoT devices to connect to the
internet using SIM cards. It operates on various frequency bands and provides wide coverage, making
it suitable for applications that require long-range communication. GSM is commonly used in
applications such as asset tracking, remote monitoring, and smart cities.
AIM:
1 Bluetooth Module 1
THEORY
Bluetooth:
Bluetooth is a short-range wireless communication technology that operates on the 2.4 GHz
frequency band. It is commonly used for connecting IoT devices to smartphones, tablets, and other
nearby devices. Bluetooth Low Energy (BLE) is a power-efficient version of Bluetooth that is ideal for
battery-powered IoT devices. Bluetooth is widely used in applications such as wearable devices,
healthcare monitoring, and home automation. Each communication method has its advantages and
limitations, and the choice depends on the specific requirements of the IoT application.
PROGRAM:
#include<SoftwareSerial.h>
SoftwareSerial mySerial(2,3); //rx,tx
void setup() {
mySerial.begin(9600);
Serial.begin(9600);
pinMode(4, OUTPUT);
}
void loop() {
if(mySerial.available()>0)
{
char data=mySerial.read();
Serial.println(data);
if(data=='1'){
digitalWrite(4,HIGH);
Serial.println("LED ON");
}
else if(data=='2'){
digitalWrite(4,LOW);
Serial.println("LED OFF");
}
}
}
OUTPUT:
RESULT:
Thus, the different communication methods with IoT devices (Zigbee, GSM, Bluetooth) are
studied successfully.
AIM:
The Raspberry Pi Pico W is a compact and affordable microcontroller board developed by the Raspberry
Pi Foundation. Building upon the success of the Raspberry Pi Pico, the Pico W variant brings wireless
connectivity to the table, making it an even more versatile platform for embedded projects. In this article,
we will provide a comprehensive overview of the Raspberry Pi Pico W, highlighting its key features and
capabilities.
Features:
One of the unique features of the RP2040 microcontroller is the inclusion of Programmable
Input/Output (PIO) state machines. These state machines provide additional processing power and
flexibility for handling real-time data and timing-critical applications. The PIO state machines can be
programmed to interface with custom protocols, generate precise waveforms, and offload tasks from
the main processor, enhancing the overall performance of the system. Open-Source and Community
Support. As with all Raspberry Pi products, the Pico W benefits from the vibrant and supportive
Raspberry Pi community. Raspberry Pi provides extensive documentation, including datasheets, pinout
diagrams, and programming guides, to assist developers in understanding the board’s capabilities. The
community offers forums, online tutorials, and project repositories, allowing users to seek help, share
knowledge, and collaborate on innovative projects.
LED:
import time
while True:
LED.value(1)
time.sleep(1)
LED.value(0)
time.sleep(1)
OUTPUT
Thus, the Raspberry Pi Platform and python programming are studied successfully.
AIM:
PROGRAM:
IR SENSOR:
ULTRASONIC SENSOR:
OUTPUT:
RESULT:
Thus, the IR sensor and Ultrasound sensor are interfaced with Raspberry Pi executed
successfully.
AIM:
To write and execute the program to Communicate between Arduino and Raspberry PI using any
wireless medium (Bluetooth)
APPARATUS REQUIRED
PROGRAM:
MASTER- ARDUINO:
#include<SoftwareSerial.h>
void setup() {
mySerial.begin(9600);
void loop() {
mySerial.write('A');
delay(1000);
mySerial.write('B');
delay(1000);
CONNECTIONS:
RESULT:
Thus the program to Communicate between Arduino and Raspberry PI using any wireless
medium (Bluetooth) was written and executed successfully.
AIM:
1 Blynk Platform 1
CLOUD PLATFORM-BLYNK:
Setting up Blynk 2.0 Application .To control the LED using Blynk and Raspberry Pi Pico W, you need
to create a Blynk project and set up a dashboard in the mobile or web application. Here’s how you can
set up the dashboard:
Step 1: Visit blynk.cloud and create a Blynk account on the Blynk website. Or you can simply sign in
using the registered Email ID.
A new device will be created. You will find the Blynk Authentication Token Here. Copy it as it is
necessary for the code.
From the widget box drag a switch and place it on the dashboard screen.
Configure the switch settings as per the image below and click on create.
Step 7: To control the LED with a mobile App or Mobile Dashboard, you also need to setup the Mobile
Install the Blynk app on your smartphone The Blynk app is available for iOS and Android. Download
and install the app on your smartphone. then need to set up both the Mobile App and the Mobile
Dashboard in order to control the LED with a mobile device. The process is explained above.
2. Open Blynk.App
5. Find the “Raspberry Pi Pico Pico W” template we created on the web and tap on it
6. Tap on the “Raspberry Pi Pico Pico W” template (this template automatically comes because we
RESULT:
Thus, the cloud program to log the data from IoT devices is set up successfully.
AIM:
To write and execute the program Log Data using Raspberry PI and upload it to the cloud
platform .
1 Thonny IDE 1
3 Jump Wires 1
PROGRAM:
RESULT:
Thus, the program to execute Log Data using Raspberry pi and uploading it to the cloud platform
is done successfully.
AIM:
APPARATUS REQUIRED :
1 . PC with windows 1
2. Arduino 1.6.5 1
THEORY :
The infrared Obstacle Sensor Module has a built-in IR transmitter and IR receiver that sends out
IR energy and looks for reflected IR energy to detect the presence of any obstacle in front of the sensor
module. IR sensor is an electronic device, that emits the light in order to sense some object of the
surroundings. An IR sensor can measure the heat of an object as well as detects the motion. Usually, in
the infrared spectrum, all the objects radiate some form of thermal radiation. These types of radiations
are invisible to our eyes, but infrared sensor can detect these radiations. The program will give feedback
to the driver based on the proximity of the car to the obstacle. We'll use an LED to indicate the presence
of Free slot. The usage of this experiment becomes the major part in numerous and exclusive Malls,
#include <LiquidCrystal.h>
LiquidCrystal lcd (11,10,9,8,7,6);
int sen1 = 4;
int sen2 = 3;
int sen3 = 2;
void setup()
{
Serial.begin(9600);
lcd.begin(16,2);
pinMode(sen1, INPUT);
pinMode(sen2, INPUT);
pinMode(sen3, INPUT);
}
void loop()
{
int irValue1 = digitalRead(sen1);
int irValue2 = digitalRead(sen2);
int irValue3 = digitalRead(sen3);
if (irValue1 == LOW && irValue2 == HIGH && irValue3 == HIGH)
{
lcd.clear();
lcd.setCursor(1,1);
lcd.print("slot 1 free");
delay(100);
} else if (irValue2 == LOW && irValue1 == HIGH && irValue3 == HIGH)
{
lcd.clear();
lcd.setCursor(0,1);
delay(100);
}
else if (irValue1 == HIGH && irValue2 == HIGH && irValue3 == HIGH)
{
lcd.clear();
lcd.setCursor(1,1);
lcd.print("parking full");
delay(100);
}
}
RESULT:
Thus, the program for Carparking assist using IR Sensors was designed successfully.