Es&iomt Lab Manuval-3-42
Es&iomt Lab Manuval-3-42
Aim
To Explore AVR/ARM based controllers using Embedded C.
Apparatus Required
1. Personal computer
2. Arduino Uno board
3. Arduino simulator
PROCEDURE
Arduino Board
An Arduino board is a one type of microcontroller based kit. The first Arduino technology was
developed in the year 2005 by David Cuartielles and Massimo Banzi. The designers thought to
provide easy and low cost board for students, hobbyists and professionals to build devices.
Arduino board can be purchased from the seller or directly we can make at home using various
basic components. The best examples of Arduino for beginners and hobbyists includes motor
detectors and thermostats, and simple robots
Arduino Technology
A typical example of the Arduino board is Arduino Uno.It includes an ATmega328
microcontroller and it has 28-pins
1
The pin configuration of the Arduino Uno board is shown in the above. It consists of 14-digital i/o
pins. Wherein 6 pins are used as pulse width modulation o/ps and 6 analog i/ps, a USB connection, a
power jack, a 16MHz crystal oscillator, a reset button, and an ICSP header. Arduino board can be
powered either from the personal computer through a USB or external source like a battery or an
adaptor. This board can operate with an external supply of 7-12V by giving voltage reference
through the IORef pin or through the pin Vin.
Digital I/Ps
It comprises of 14-digital I/O pins, each pin take up and provides 40mA current. Some of the pins
have special functions like pins 0 & 1, which acts as a transmitter and receiver respectively. For
serial communication, pins-2 & 3 are external interrupts, 3,5,6,9,11 pins delivers PWM o/p and pin-
13 is used to connect LED.
Analog i/ps: It has 6-analog I/O pins, each pin provide a 10 bits resolution.
Aref: This pin gives a reference to the analog i/ps.
Reset: When the pin is low, then it resets the microcontroller.
Arduino Architecture
Basically, the processor of the Arduino board uses the Harvard architecture where the program code
and program data have separate memory. It consists of two memories such as program memory and
data memory. Wherein the data is stored in data memory and the code is stored in the flash program
memory. The Atmega328 microcontroller has 32kb of flash memory, 2kb of SRAM 1kb of EPROM
and operates with a 16MHz clock speed.
Arduino Architecture
2
Basic Functions of Arduino Technology
Digital read pin reads the digital value of the given pin.
Digital write pin is used to write the digital value of the given pin.
Pin mode pin is used to set the pin to I/O mode.
Analog read pin reads and returns the value.
Analog write pin writes the value of the pin.
Serial. Begins pin sets the beginning of serial communication by setting the rate of bit.
Advantages of Arduino Technology
It is cheap
It comes with an open supply hardware feature that permits users to develop their own kit
The software of the Arduino is well-suited with all kinds of in operation systems like Linux,
Windows, and Macintosh, etc.
It also comes with open supply software system feature that permits tough software system
developers to use the Arduino code to merge with the prevailing programing language
libraries and may be extended and changed.
For beginners, it is very simple to use.
Simple program
BLINK LED
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
Result
3
Ex no:02
Basic and arithmetic Programs Using Embedded C
Date:
Aim:
To write Basic and arithmetic Programs Using Embedded C
Apparatus Required
1. Personal computer
2. Arduino Uno board
3. Arduino simulator
Procedure
Data Types: Embedded systems typically support various data types, such as integers (signed and
unsigned), floating-point numbers, and fixed-point numbers. The choice of data type depends on
factors like the required range, precision, and memory constraints.
Binary Representation: Arithmetic operations in embedded systems are performed using binary
representation. Numbers are typically stored in binary format using a fixed number of bits. For
example, an 8-bit microcontroller can store values from 0 to 255.
Integer Arithmetic: Embedded systems often deal with integer arithmetic. Addition and
subtraction of integers are straightforward and can be performed using binary addition and
subtraction algorithms. Multiplication and division operations may require more complex
algorithms like shifting and bit manipulation.
4
Program
Arithmetic Program
void setup() {
// Initialize Serial
// Communication
Serial.begin(57600);
}
void loop() {
int num1 = 10; // First
// number
int num2 = 5; // Second
//number
int result; // Result
// Perform arithmetic
//operations
result = num1 + num2; // Addition
Serial.print("Sum: ");
Serial.println(result);
result = num1 - num2;
// Subtraction
Serial.print("Difference: ");
Serial.println(result);
result = num1 * num2;
//multiplication
Serial.print("Product: ");
Serial.println(result);
result = num1 / num2;
// Division
5
Serial.print("Quotient: ");
Serial.println(result);
delay(1000);
// Delay for 1 second
}
void setup() {
// Initialize serial communication for debugging (optional)
Serial.begin(57600);
}
void loop() {
// Define two variables to hold the numbers
int num1 = 10;
int num2 = 20;
// Do nothing for a short period to avoid spamming the Serial Monitor (optional)
delay(5000);
}
6
Program to Calculate the Average of Three Numbers:
void setup() {
// Initialize serial communication for debugging (optional)
Serial.begin(9600);
}
void loop() {
// Define three variables to hold the numbers
int num1 = 10;
int num2 = 20;
int num3 = 30;
// Do nothing for a short period to avoid spamming the Serial Monitor (optional)
delay(5000);
}
7
Program to Find the Maximum of Two Numbers:
void setup() {
// Initialize serial communication for debugging (optional)
Serial.begin(57600);
}
void loop() {
// Define two variables to hold the numbers
int num1 = 10;
int num2 = 20;
// Do nothing for a short period to avoid spamming the Serial Monitor (optional)
delay(5000);
}
Result:
Thus the embedded C programs to perform basic and arithmetic Programs are verified.
8
Ex no: 0 3 Embedded C program to test interrupt and timers
Date:
Aim
To write Embedded C program to test interrupt and timers.
Apparatus Required
1. Personal computer
2. Arduino Uno board
3. Arduino simulator
Program
Interrupts
const int interruptPin = 2; // Pin for the external interrupt
volatile int counter = 0; // Counter variable
void ISR_function() {
counter++; // Increment the counter when the interrupt occurs
}
void setup() {
pinMode(interruptPin, INPUT_PULLUP); // Set the interrupt pin as input with pull-up resistor
attachInterrupt(digitalPinToInterrupt(interruptPin), ISR_function, FALLING); // Attach ISR to the
interrupt pin
Serial.begin(9600); // Initialize Serial communication
}
void loop() {
// Main program code (runs repeatedly)
Serial.println("Counter: " + String(counter)); // Display the counter value on the Serial Monitor
delay(1000); // Add a short delay to avoid flooding the Serial Monitor
9
}
Timers
void setup() {
pinMode(ledPin, OUTPUT); // Set the LED pin as an output
initializeTimer1(); // Initialize Timer 1
}
void loop() {
// The main program doesn't need to do anything
// The LED blinking is handled by the timer
}
void initializeTimer1() {
noInterrupts(); // Disable interrupts while setting up the timer
// Calculate the compare value based on the clock speed and desired interval
unsigned long compareValue = (F_CPU / (prescaler * intervalMicros)) - 1;
OCR1A = compareValue;
10
TIMSK1 |= (1 << OCIE1A);
Result :
Thus, the program to test interrupt and timers are verified.
11
Ex no: 0 4 Develop Real time applications – clock generation, waveform generation,
Date: counter using embedded C
Aim
To develop Real time applications – clock generation, waveform generation, counter using
embedded C.
Apparatus Required
1. Personal computer
2. Arduino Uno board
3. Arduino simulator
Program
clock generation
const int pulsePin = 9; // Pin number for the pulse wave output
void setup() {
pinMode(pulsePin, OUTPUT); // Set the pulse pin as an output
Serial.begin(9600); // Initialize Serial communication
}
void loop() {
// Generate and print the pulse wave
for (int i = 0; i < 100; i++) {
digitalWrite(pulsePin, HIGH); // Set the pin to HIGH
delay(10); // Pulse width: 10 milliseconds (adjust as needed)
digitalWrite(pulsePin, LOW); // Set the pin to LOW
delay(990); // Gap between pulses: 990 milliseconds (adjust as needed)
Serial.println("1"); // Print "1" to the Serial Monitor during the pulse
Serial.println("0"); // Print "0" to the Serial Monitor during the gap
}
}
12
Wave form generation
const int numSamples = 100; // Number of samples for the sine wave
const int amplitude = 50; // Amplitude of the sine wave
const int frequency = 1; // Frequency of the sine wave (in Hz)
const int offset = 128; // Offset to center the sine wave around 0 (0 to 255)
void setup() {
Serial.begin(9600); // Initialize Serial communication
}
void loop() {
// Generate and print the sine wave
for (int i = 0; i < numSamples; i++) {
float angle = 2 * PI * frequency * i / numSamples;
int sinValue = amplitude * sin(angle) + offset;
Serial.println(sinValue); // Print the sine value to the Serial Monitor
delay(10); // Delay to control the sine wave frequency (lower values for higher frequency)
}
}
Counter program
unsigned long previousMillis = 0; // Variable to store the last time the counter was updated
const long interval = 1000; // Interval in milliseconds (1 second)
void setup() {
Serial.begin(9600); // Initialize Serial communication
}
13
void loop() {
unsigned long currentMillis = millis(); // Get the current time
Result
Thus the program for clock generation, waveform generation, counter are verified
14
Ex no: 05
Explore different communication methods with IoT devices
Date:
Aim
To explore different communication methods with IoT devices (Zigbee, GSM, Bluetooth)
Arduino programs to communicate with IoT devices using Zigbee, GSM, and Bluetooth
Apparatus Required
1. Personal computer
2. Arduino Uno board
3. Arduino simulator
4. Zigbee, GSM and Bluetooth board
Zigbee Communication:
#include <SoftwareSerial.h>
SoftwareSerial zigbee(2, 3); // RX, TX
void setup() {
Serial.begin(9600);
zigbee.begin(9600);
}
void loop() {
if (zigbee.available()) {
char receivedData = zigbee.read();
Serial.print("Received data: ");
Serial.println(receivedData);
}
if (Serial.available()) {
char sendData = Serial.read();
15
zigbee.print(sendData);
}
}
Procedure
This program sets up communication between an Arduino and a Zigbee module using
SoftwareSerial. It reads data from the Zigbee module and prints it to the serial monitor, and it also
allows data to be sent from the serial monitor to the Zigbee module.
void setup() {
Serial.begin(9600);
gsm.begin(9600);
delay(2000);
gsm.println("AT+CMGF=1"); // Set SMS mode to text
delay(1000);
gsm.println("AT+CMGS=\"+1234567890\""); // Replace with desired phone number
delay(1000);
gsm.println("Hello from Arduino!"); // Replace with desired message
delay(1000);
gsm.println((char)26); // Send Ctrl+Z to end the message
}
16
void loop() {
// Empty loop
}
Procedure
This program uses SoftwareSerial to establish communication between an Arduino and a GSM
module. It sends an SMS message containing a predefined message to a specified phone number.
Bluetooth Communication:
#include <SoftwareSerial.h>
SoftwareSerial bluetooth(2, 3); // RX, TX
void setup() {
Serial.begin(9600);
bluetooth.begin(9600);
}
void loop() {
if (bluetooth.available()) {
char receivedData = bluetooth.read();
Serial.print("Received data: ");
Serial.println(receivedData);
}
if (Serial.available()) {
char sendData = Serial.read();
bluetooth.print(sendData);
}
}
17
Procedure
This program establishes communication between an Arduino and a Bluetooth module using
SoftwareSerial. It reads data from the Bluetooth module and prints it to the serial monitor, and it also
allows data to be sent from the serial monitor to the Bluetooth module.
Make sure to adjust the pins used for SoftwareSerial communication and modify the specific
settings based on your IoT devices' requirements. Additionally, ensure that you have the necessary
libraries installed for Zigbee, GSM, or Bluetooth communication.
Result:
Thus the Arduino programs to communicate with IoT devices (Zigbee, GSM, Bluetooth) are written
and verified for its execution.
18
Ex no: 06 To interface LED/Buzzer with Arduino and write an embedded C program
Date: to turn on / off LED/Buzzer with specified delay
Aim
To interface LED/Buzzer with platform/ Aurdino /Raspberry Pi and write an embedded C program to
turn on / off LED/Buzzer with specified delay.
Program
This program blinks the built-in LED on the Arduino board with a 1-second interval.
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(1000);
digitalWrite(LED_BUILTIN, LOW);
delay(1000);
}
19
void loop() {
int buttonState = digitalRead(buttonPin);
if (buttonState == LOW) {
digitalWrite(ledPin, HIGH);
} else {
digitalWrite(ledPin, LOW);
}
}
Result:
Thus the basic Arduino programs are verified for its execution
20
Ex no: 07 Interface stepper motor using relay with Arduino and write an
Date: embedded C program to turn on motor if push button is pressed.
Aim
To interface stepper motor using relay with Arduino and write an embedded C program to turn on
motor if push button is pressed.
Apparatus Required
1. Personal computer
2. Arduino Uno board
3. Arduino simulator
Program
To interface stepper motor using relay with open platform/ Arduino
// Define the pins connected to the ULN2003A inputs
const int in1Pin = 8;
const int in2Pin = 9;
const int in3Pin = 10;
const int in4Pin = 11;
void setup() {
// Set the IN pins as outputs
pinMode(in1Pin, OUTPUT);
pinMode(in2Pin, OUTPUT);
pinMode(in3Pin, OUTPUT);
pinMode(in4Pin, OUTPUT);
}
void loop() {
// Rotate the stepper motor clockwise
rotateClockwise(200); // 200 steps
delay(1000); // Pause for 1 second
// Rotate the stepper motor counterclockwise
21
rotateCounterclockwise(200); // 200 steps
delay(1000); // Pause for 1 second
}
// Function to rotate the stepper motor clockwise
void rotateClockwise(int steps) {
for (int i = 0; i < steps; i++) {
digitalWrite(in1Pin, HIGH);
digitalWrite(in2Pin, LOW);
digitalWrite(in3Pin, LOW);
digitalWrite(in4Pin, LOW);
delay(10);
digitalWrite(in1Pin, LOW);
digitalWrite(in2Pin, HIGH);
digitalWrite(in3Pin, LOW);
digitalWrite(in4Pin, LOW);
delay(10);
digitalWrite(in1Pin, LOW);
digitalWrite(in2Pin, LOW);
digitalWrite(in3Pin, HIGH);
digitalWrite(in4Pin, LOW);
delay(10);
digitalWrite(in1Pin, LOW);
digitalWrite(in2Pin, LOW);
digitalWrite(in3Pin, LOW);
digitalWrite(in4Pin, HIGH);
delay(10);
}
}
// Function to rotate the stepper motor counterclockwise
void rotateCounterclockwise(int steps) {
for (int i = 0; i < steps; i++) {
digitalWrite(in1Pin, LOW);
22
digitalWrite(in2Pin, LOW);
digitalWrite(in3Pin, LOW);
digitalWrite(in4Pin, HIGH);
delay(10);
digitalWrite(in1Pin, LOW);
digitalWrite(in2Pin, LOW);
digitalWrite(in3Pin, HIGH);
digitalWrite(in4Pin, LOW);
delay(10);
digitalWrite(in1Pin, LOW);
digitalWrite(in2Pin, HIGH);
digitalWrite(in3Pin, LOW);
digitalWrite(in4Pin, LOW);
delay(10);
digitalWrite(in1Pin, HIGH);
digitalWrite(in2Pin, LOW);
digitalWrite(in3Pin, LOW);
digitalWrite(in4Pin, LOW);
delay(10);
}
}
Result
Thus the program to interface stepper motor using relay with audrino and also to turn on motor if
push button is pressed using embedded C are verified.
23
Ex no: 08 Develop simple application – testing infrared sensor using Raspberry
Date: Pi/cloud platfrom.
Aim
Develop simple application – testing infrared sensor – IoT Applications – using open platform/Raspberry
Pi
Apparatus Required
1. Personal computer
2. Raspberry Pi board
3. Cloud platform
Procedure
1. Make sure you have WiringPi installed on your Raspberry Pi. If not, you can install it by following
the instructions at: http://wiringpi.com/download-and-install/
2. Create a new C source file, for example, ir_sensor_test.c.
3. Open the file in a text editor and add the following code
4. Save the file and exit the text editor.
5. Open a terminal on your Raspberry Pi.
6. Compile the program using the following command:
Program
#include <wiringPi.h>
#include <stdio.h>
#define IR_SENSOR_PIN 1 // Use the appropriate GPIO pin number
int main(void) {
if (wiringPiSetup() == -1) {
24
printf("Unable to initialize WiringPi\n");
return 1;
}
pinMode(IR_SENSOR_PIN, INPUT);
while (1) {
int sensorValue = digitalRead(IR_SENSOR_PIN);
if (sensorValue == HIGH) {
printf("Object detected!\n");
} else {
printf("No object detected.\n");
}
delay(100); // Delay for 100 milliseconds
}
return 0;
}
Procedure
1. The program will continuously read the state of the IR sensor pin and print "Object detected!" or "No
object detected." based on the sensor's output.
2. Please note that you might need to adjust the IR_SENSOR_PIN value in the code to match the GPIO pin
number you connected the IR sensor output to.
3. Ensure that you have the necessary permissions to access GPIO pins. You may need to run the program
with root privileges (e.g., using sudo) or add your user to the gpio gro
Program
IOT application
#include <stdio.h>
#include <stdlib.h>
25
#include <wiringPi.h>
#include <mosquitto.h>
#define IR_SENSOR_PIN 17
#define MQTT_HOST "your_mqtt_host"
#define MQTT_PORT 1883
#define MQTT_TOPIC "your_topic"
int main(void)
{
wiringPiSetupGpio(); // Initialize WiringPi
26
{
printf("Failed to create MQTT instance.\n");
return 1;
}
mosquitto_connect_callback_set(mosq, mqtt_connect_callback);
if (mosquitto_connect(mosq, MQTT_HOST, MQTT_PORT, 60) != MOSQ_ERR_SUCCESS)
{
printf("Failed to connect to MQTT broker.\n");
mosquitto_destroy(mosq);
mosquitto_lib_cleanup();
return 1;
}
while (1)
{
int sensorValue = digitalRead(IR_SENSOR_PIN);
if (sensorValue == HIGH)
{
char message[10];
snprintf(message, sizeof(message), "%d", sensorValue);
mosquitto_publish(mosq, NULL, MQTT_TOPIC, sizeof(message), message, 0, false);
}
delay(500); // Delay for 500 milliseconds
} mosquitto_destroy(mosq);
mosquitto_lib_cleanup();
return 0;
}
Result
Thus the program for IOT application based IR sensor are verified
27
Ex no: 0 9 Develop simple application to interface DHT11 sensor with Arduino and
Date: write a program to display temperature humidity readings in LCD.
Aim
To develop simple application to interface DHT11 sensor with Arduino and write a program to
display temperature humidity readings in LCD.
Apparatus Required
1. Personal computer
2. Arduino Uno board
3. Arduino simulator
Program
import Adafruit_DHT
sensor = Adafruit_DHT.DHT11
pin = 4
while True:
humidity, temperature = Adafruit_DHT.read_retry(sensor, pin)
This program interfaces a DHT11 temperature and humidity sensor with the Arduino
using the Adafruit_DHT library. It continuously reads and prints the temperature and
28
humidity values from the sensor.
#include <Adafruit_Sensor.h>
#include <DHT.h>
#include <DHT_U.h>
void setup() {
Serial.begin(115200);
dht.begin();
}
void loop() {
// Wait a few seconds between measurements.
delay(2000);
// Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
sensors_event_t event;
dht.temperature().getEvent(&event);
if (isnan(event.temperature)) {
Serial.println(F("Error reading temperature!"));
}
else
{
Serial.print(F("Temperature: "));
Serial.print(event.temperature);
Serial.println(F(" °C"));
29
}
dht.humidity().getEvent(&event);
if (isnan(event.relative_humidity)) {
Serial.println(F("Error reading humidity!"));
} else {
Serial.print(F("Humidity: "));
Serial.print(event.relative_humidity);
Serial.println(F("%"));
}
}
This program is used to replace the lcd.h and lcd_init() with the appropriate header file and
initialization function for your specific LCD module. The readTemperatureHumidity() function should
be implemented according to the method of reading temperature and humidity values from your
sensors.
Result:
Thus the programs for interfacing of various sensors with Raspberry Pi and also display
temperature humidity readings are written and verified for its execution
30
Ex no: 1 0 Develop IoMT Application using Aurdino and sensors such as temperature,
Date: ECG, Pulse
Aim
To Develop IoMT Application using Aurdino and sensors such as temperature, ECG, Pulse.
Apparatus Required
1. Personal computer
2. Arduino Uno board
3. Arduino simulator
Program
#include <OneWire.h
#include <DallasTemperature.h>
#include <Wire.h>
#include <Adafruit_Sensor.h>
#include <Adafruit_MAX30102.h>
#define ONE_WIRE_BUS 2
OneWire oneWire(ONE_WIRE_BUS);
DallasTemperature sensors(&oneWire);
void setup() {
Serial.begin(9600);
sensors.begin();
if (!pulseSensor.begin(Wire, I2C_SPEED_FAST)) {
Serial.println("Sensor not found. Check wiring!");
31
while (1);
}
pulseSensor.setup();
}
void loop() {
sensors.requestTemperatures();
float temperature = sensors.getTempCByIndex(0);
pulseSensor.getHR();
int pulseRate = pulseSensor.getHeartRate();
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.println(" °C");
Serial.print("ECG: ");
Serial.println(ecgValue);
delay(1000);
}}
Result:
Thus the programs for communicating Arduino with Raspberry Pi are written and verified for its
execution.
32
Ex no: 1 1 Deploy IoMT applications using platforms
Date:
Aim
To deploy IoMT applications using platforms
Procedure
This program interfaces an HC-SR04 ultrasonic distance sensor with the Raspberry Pi. It uses
the GPIO library to control the GPIO pins. It continuously measures and prints the distance in
centimeters.
Program
Interfacing an Ultrasonic Distance Sensor (HC-SR04) with Raspberry Pi
import RPi.GPIO as GPIO
import time
GPIO.setmode(GPIO.BCM)
trigger_pin = 18
echo_pin = 24
GPIO.setup(trigger_pin, GPIO.OUT)
GPIO.setup(echo_pin, GPIO.IN)
while True:
GPIO.output(trigger_pin, True)
time.sleep(0.00001)
GPIO.output(trigger_pin, False)
start_time = time.time()
stop_time = time.time()
while GPIO.input(echo_pin) == 0:
start_time = time.time()
while GPIO.input(echo_pin) == 1:
stop_time = time.time()
33
elapsed_time = stop_time - start_time
distance = (elapsed_time * 34300) / 2
print(f'Distance: {distance} cm')
time.sleep(1)
if (!bmp.begin(0x76)) {
Serial.println("Could not find a valid BMP280 sensor, check wiring!");
while (1);
}
}
void loop() {
sensors_event_t pressureEvent;
bmp.getEvent(&pressureEvent);
if (pressureEvent.pressure) {
float pressurePa = pressureEvent.pressure;
float pressurePsi = pressurePa * 0.0001450377; // Conversion to psi
34
delay(1000); // Adjust the delay as per your requirements
}
Result
Thus the program to deploy IoMT applications using platforms are verified
35
Ex no: 12 MINI PROJECT TOPICS
Date:
36
Ex no: 1 3
Communication between Arduino and Raspberry PI using Bluetooth
Date:
#include <SoftwareSerial.h>
void setup() {
Serial.begin(9600);
bluetooth.begin(9600);
}
void loop() {
if (bluetooth.available()) {
char receivedData = bluetooth.read();
Serial.print("Received data: ");
Serial.println(receivedData);
}
if (Serial.available()) {
char sendData = Serial.read();
bluetooth.print(sendData);
}
}
ser = serial.Serial('/dev/rfcomm0', 9600) # Update with the correct Bluetooth serial port
37
try:
while True:
message = input("Enter a message to send: ")
ser.write(message.encode())
print("Message sent")
except KeyboardInterrupt:
pass
ser.close()
In the Arduino code, we use the SoftwareSerial library to establish communication with the
Bluetooth module. It reads data from the Bluetooth module and prints it to the serial monitor. It
also allows data to be sent from the serial monitor to the Bluetooth module.
On the Raspberry Pi, we use the serial library to establish communication with the Bluetooth
module. It prompts the user to enter a message, sends it to the Arduino over Bluetooth, and prints a
confirmation message.
Make sure to pair the Arduino and Raspberry Pi via Bluetooth and identify the correct serial
port (/dev/rfcomm0 in this example) on the Raspberry Pi before running the code.
Result:
Thus the programs for communicating Arduino with Raspberry Pi are written and verified for its
execution
38
Ex no: 1 4
8051 Assembly Language using simulator
Date:
Aim
1 a. To Write an ALP to move a block of data from one internal memory location to other.
39
1b) Write an ALP to move a block of data from one external memory location to other
Result:
Thus the data transfer between registers and memory in 8051 has been tested and verified.
40