Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

6 (A) INTRODUCTION TO RASPBERRY PI PLATFORM AND PYTHON

PROGRAMMING

AIM: To study the basics of Raspberry PI platform and python programming.

SOFTWARE AND HARDWARE REQUIRED:

S.no Software and Hardware Requirements Quantity


1. Raspberry Pi 1
2. HDMI cable and monitor 1
3. MicroSD card 1
4. Mouse and Keyboard 1

PROCEDURE:
Step 1: Download the latest version of Raspbian from the Raspberry Pi website.
Step 2 : Insert the microSD card into the Raspberry Pi, connect the peripherals
(HDMI, keyboard, mouse, etc.), and power it up.
Step 3: Open the terminal on Raspberry Pi or connect via SSH.
Step 4: Alternatively, you can install a Python IDE like Thonny or Visual Studio
Code for a more integrated development environment.
Step 5: Save your Python script with a .py extension and open a terminal window.
Step 6: If you have additional hardware components like LEDs, sensors, etc., you
can interface them with Raspberry Pi using its GPIO pins.
Step 7: Python has a vast ecosystem of libraries and frameworks. Explore different
domains such as web development, data science, robotics, etc., using Python on
Raspberry Pi.
Step 8: If you encounter any issues or have questions, Raspberry Pi has a vibrant
online community.
6 (B) LED BLINKING WITH RASPBERRY PI

AIM: To create a simple LED blinking with Raspberrypi.

SOFTWARE REQUIRED:

S.no Software Requirements Quantity

1. Raspberry pi (any model will work) 1


2. LED (any color) 1
3. Resistor (220 ohms is common for led) 1
4. Breadboard 1
5. Jump Wires 2

PROCEDURE:
Step 1: Insert the longer leg of the LED (the anode, positive) into a GPIO pin on
the Raspberry Pi. For example, GPIO pin 17.
Step 2 : Connect the shorter leg (the cathode, negative) to one end of the resistor.
Step 3: Connect the other end of the resistor to one of the ground (GND) pins on
the Raspberry Pi.
Step 4: Setup your Raspberry Pi and make sure your Raspberry Pi is powered off.
Step 5: Connect your breadboard and LED setup to the GPIO pins as described
above and Power on your Raspberry Pi.
Step 6: Save this file with a .py extension, for example, blink_led.py.
Step 7: Run your Python code and navigate to the directory where your Python file
is saved.
7 (A) INTERFACING SENSOR WITH ARDUINO

AIM: To create an interfacing sensor with arduino

SOFTWARE REQUIRED:

S.no Software Requirements Quantity

1. Arduino Board 1
2. Sensors 1
3. Connecting wires 2
4. Resistors 1
5. Breadboard 1

PROCEDURE:
Step 1:Study the Datasheet: Understand the sensor's pins, voltage requirements,
and communication protocol if any.
Step 2 :Identify and connect power (5V or 3.3V), ground, and signal pins of the
sensor to corresponding pins on the Arduino.
Step 3: Open Arduino IDE, create a code to read data from the sensor, initializing
it and processing the readings, while including necessary libraries for the sensor.
Step 4: Upload your code to the Arduino board.
Step 5: Open Serial Monitor, check if the baud rate matches, and verify if sensor
data is displayed correctly
Step 6: Adjust code and connections for accuracy and stability.
Step 7: Once your sensor is successfully interfaced with the Arduino, you can
integrate it into your sending data over the internet.
7 (B) INTERFACING SENSOR WITH BOTH ARDUINO AND
RASPBERRY PI

AIM: To study the basics of interfacing sensor with both arduino and Raspberry PI

SOFTWARE REQUIRED:

S.no Software Requirements Quantity

1. Arduino board (UNO) 1


2. Raspberry Pi board 1
3. Connecting wires 2
4. Resistor 1
5. Breadboard 1

PROCEDURE:
Step 1:Identify and connect power, ground, and signal pins of the sensor to
corresponding pins on the Arduino.
Step 2 :Use Arduino IDE to write code for sensor initialization, data reading, and
processing and include necessary libraries for the sensor.
Step 3: Open Arduino IDE, create a code to read data from the sensor, initializing
it and processing the readings, while including necessary libraries for the sensor.
Step 4: Fine-tune code and connections as needed and integrate into a larger
Arduino project if required.
Step 5: Connect the sensor to the appropriate GPIO pins on the Raspberry Pi.
Step 6: Use Python and libraries like RPi.GPIO or GPIO Zero to write code for
sensor initialization, data reading, and processing.
Step 7: Fine-tune code and connections as needed and integrate into a larger
Raspberry Pi project if required.
8(A) EXPLORE COMMUNICATION BETWEEN ARDUINO USING
BLUETOOTH AND GSM

AIM: To explore the communication between arduino using bluetooth and GSM.

SOFTWARE REQUIRED:

S.no Software Requirements Quantity

1. Arduino boards 2
2. Bluetooth Modules 2
3. GSM modules 2
4. SIM cards 2

PROCEDURE:
Step 1:Attach one Bluetooth module to each Arduino and connect the TX pin of
one Arduino to the RX pin of the Bluetooth module, and vice versa.
Step 2 : Attach one GSM module to each Arduino and connect the TX pin of one
Arduino to the RX pin of the GSM module, and vice versa.
Step 3: Connect VCC and GND pins of the GSM modules to the corresponding
pins on the Arduino and insert SIM cards into the GSM modules.
Step 4: Create code for both Arduinos to manage communication via Bluetooth
and GSM.
Step 5: Develop logic for data transmission and reception over Bluetooth and
GSM connections.
Step 6: Establish protocols for data exchange between the Arduinos. This can be
as simple as ASCII-based commands or a more intricate communication protocol.
Step 7: Power on the Arduinos and ensure proper connection and power supply to
the Bluetooth and GSM modules.
Step 8: Test communication by sending data over Bluetooth and GSM connections
and debug and confirm data transmission using the Serial Monitor.
Step 9: Fine-tune code and connections as needed to ensure reliable
communication.

8(B) EXPLORE COMMUNICATION BETWEEN RASPBERRY PI USING


BLUETOOTH AND GSM

AIM: To explore communication between Raspberry Pi using Bluetooth and


GSM.

SOFTWARE REQUIRED:

S.no Software Requirements Quantity

1. Raspberry Pi Boards 2
2. Bluetooth modules 2
3. GSM modules 2
4. SIM cards 2

PROCEDURE:
Step 1: Connect one Bluetooth module to each Raspberry Pi and use the GPIO
pins of the Raspberry Pi to establish serial communication with the Bluetooth
modules.
Step 2 : Connect one GSM module to each Raspberry Pi and use the GPIO pins of
the Raspberry Pi to establish serial communication with the GSM modules.
Step 3: Follow the wiring diagram provided by the manufacturer of the GSM
module and insert SIM cards into the GSM modules.
Step 4: Make sure both Raspberry Pis are set up and running with the necessary
operating system (e.g., Raspbian).
Step 5: Utilize libraries such as PyBluez for Bluetooth communication and
pySerial for serial communication with the GSM modules.
Step 6: Define protocols for data transfer between the Raspberry Pis. This can be
simple message passing or a more complex communication protocol.
Step 7: Power on the Raspberry Pis and ensure that both Bluetooth and GSM
modules are properly connected and powered.
Step 8: Fine-tune your Python code and connections as necessary to ensure
reliable communication.

9 COMMUNICATION BETWEEN ARDUINO TO RASPBERRY PI USING


BLUETOOTH AND GSM

AIM: To study the communication between Arduino to raspberry pi using


Bluetooth and gsm.

SOFTWARE REQUIRED:

S.no Software Requirements Quantity

1. Arduino Board 1
2. Raspberry Pi Board 1
3. Bluetooth Module 1
4. GSM Module 1
5. SIM card 1

PROCEDURE:
Step 1: Connect the TX pin of the Bluetooth module to the RX pin of the Arduino,
and vice versa and power the Bluetooth module using appropriate voltage levels
(usually 3.3V or 5V).
Step 2 : Connect the TX pin of the GSM module to any digital pin (e.g., pin 2) of
the Arduino and connect the RX pin of the GSM module to any digital pin (e.g.,
pin 3) of the Arduino.
Step 3: Connect the ground (GND) pin of the GSM module to the ground (GND)
pin of the Arduino.
Step 4: Make sure your Raspberry Pi is set up and running with the necessary
operating system (e.g., Raspbian).
Step 5: Use SoftwareSerial library to establish serial communication with the
Bluetooth and GSM modules.
Step 6: Define protocols for data transfer between Arduino and Raspberry Pi and it
can be simple message passing or a more complex communication protocol based
on your application requirements.
Step 7: Test communication by sending data over Bluetooth and GSM connections
and monitor the console output or debug messages to verify data transmission.

10 SET A CLOUD PLATFORM TO LOG DATA USING RASPBERRY PI

AIM: To set a cloud platform to log data using Raspberry Pi.

SOFTWARE REQUIRED:

S.no Software Requirements Quantity

1. Raspberry Pi 1
2. MicroSD Card 1
3. Internet Connection
4. Cloud Platform Account

PROCEDURE:
Step 1:Insert the microSD card into the Raspberry Pi and connect it to a power
source and Install the Raspbian operating system on the microSD card.
Step 2 : Connect the Raspberry Pi to the internet via Wi-Fi or Ethernet.
Step 3: Install required libraries for cloud platform communication (e.g., AWS
SDK, Google Cloud SDK).
Step 4:
Step 5: Use SoftwareSerial library to establish serial communication with the
Bluetooth and GSM modules.
Step 6: Define protocols for data transfer between Arduino and Raspberry Pi and it
can be simple message passing or a more complex communication protocol based
on your application requirements.
Step 7: Test communication by sending data over Bluetooth and GSM connections
and monitor the console output or debug messages to verify data transmission.

You might also like