2024 Previous
2024 Previous
Logical operators are used to perform logical operations on Boolean values. Python supports
three main logical operators:
4. Run the Raspberry Pi Imager and choose the OS (e.g., Raspberry Pi OS).
7. Insert the SD card into the Raspberry Pi, connect peripherals (monitor, keyboard,
mouse), and power it up.
c) Fingerprint Sensor
A fingerprint sensor is a biometric device that scans and recognizes fingerprints for
authentication and identification.
Types include:
Used in:
• Smartphones
• Security applications
f) Wi-Fi
Wi-Fi (Wireless Fidelity) is a wireless networking technology that enables devices to connect to
the internet and each other over a wireless local area network (WLAN).
Key Points:
# Output result
Description: A simple push-button switch is connected to a GPIO pin on the Raspberry Pi. A pull-
down resistor ensures the input reads LOW when the button is not pressed.
3.3V
[]
[Button]
[10kΩ]
GND
If you want a proper circuit diagram image, I can find one online for you—would you like that?
b) Basic Architecture of SoC (System on Chip)
A System on Chip (SoC) is an integrated circuit that integrates all components of a computer or
other electronic system into a single chip.
4. I/O Interfaces
7. Connectivity Modules
8. Bus Systems
Summary:
An SoC integrates all major hardware blocks on a single chip, making devices more compact,
power-efficient, and cost-effective—commonly used in mobile devices, Raspberry Pi, embedded
systems, etc.
a) LCD Interfacing to Raspberry Pi [5 marks]
Circuit Diagram:
(Since I can provide visual aids, would you like me to show a labeled circuit diagram image of
Raspberry Pi and LCD interfacing?)
Components Required:
• Jumper wires
• Breadboard
Pin Connections:
Working:
• LCD works using control pins (RS, RW, E) and data pins (D4-D7 for 4-bit mode).
• You can use libraries like RPLCD or gpiozero in Python to send data/commands to the
LCD.
Operating System Usually none (bare-metal or RTOS) Runs OS like Linux or Windows
Applications Real-time control (robots, sensors) Complex tasks (AI, media, IoT)
The ARM1176JZF-S processor is part of the ARM11 family and was used in devices like the
Raspberry Pi 1.
Key Parameters:
• Architecture: ARMv6
• Core: ARM1176JZF-S
• Pipeline: 8-stage
1. GPIO.setup()
o Use Case: To set pin 18 as an output pin for controlling an LED or relay.
2. GPIO.output()
o Library: RPi.GPIO
3. GPIO.input()
o Library: RPi.GPIO
o Use Case: To read values from analog sensors like temperature or light sensors.
5. serial.read() / serial.write()
o Library: pySerial
o Example:
o ser.write(b'Hello')
o data = ser.read(5)
o Use Case: To communicate with serial devices like GSM modules, GPS, or Arduino
boards.
+----------------------+
| Input Devices |
| (Sensors, Switches) |
+----------+-----------+
+-------------------+
| (Microcontroller/ |
| Microprocessor) |
+-------------------+
|
v
+----------------------+
| Output Devices |
+----------------------+
^ |
| v
1. Input Devices:
2. Embedded Processor:
3. Memory:
4. Output Devices:
5. Communication Interfaces:
Network access devices in SBCs (like Raspberry Pi, BeagleBone, etc.) refer to
hardware interfaces and components that enable internet or LAN connectivity,
such as:
• Ethernet ports
• Wi-Fi modules/chips
• Bluetooth modules
A DMA controller allows peripherals (like audio cards or disk drives) to transfer
data to/from memory without CPU intervention. This improves efficiency and
speeds up data transfer by bypassing the CPU for memory operations.
f) Bluetooth Module
They are commonly used for wireless control, data transfer, or IoT
communication.
Library Function:
A library function is a pre-written, pre-compiled routine or set of routines
provided by a programming language's standard or external libraries. These
functions can be used to perform common tasks like mathematical operations,
input/output handling, data manipulation, hardware control, etc., so that the
programmer doesn't have to write the code from scratch.
i) GPIO.cleanup()
• Purpose: It resets the status of all GPIO (General Purpose Input Output) pins used in a
program. It’s essential to call this at the end of a program to avoid pin conflicts in future
programs.
ii) ord(x)
iii) frozenset(s)
A fingerprint sensor captures the pattern of ridges and valleys on a finger. Here's
how it works:
1. Image Capture: The sensor captures a digital image of the fingerprint using optical,
capacitive, or ultrasonic methods.
2. Feature Extraction: The system extracts unique features from the fingerprint image,
such as ridge endings and bifurcations.
3. Matching: These features are compared against stored templates in the database for
authentication or identification.
2. Memory:
3. Input/Output Interfaces:
o Interfaces like UART, USB, SPI, I2C for communication with peripherals.
4. Timers/Counters:
6. Interconnects/Buses:
8. Peripheral Controllers:
9. Security Engine:
Would you like me to fetch a neat diagram for SoC architecture from the web?
b) Bitwise Operators in Python (Any Four)
2. | – Bitwise OR
3. ^ – Bitwise XOR
4. ~ – Bitwise NOT
# Subtract numbers
Single Board
Feature Microcontroller
Computer (SBC)
Power Moderate to
Very low
Consumption high
More complex,
Simpler, meant for
Complexity suitable for
specific tasks
multitasking
Components Needed:
• Jumper wires
• Breadboard
Circuit Connections:
• Connect the other end of the resistor to the anode (+) of the LED.
• Connect the cathode (−) of the LED to GND (e.g., Pin 6) on Raspberry Pi.
import time
LED_PIN = 23 # GPIO23
GPIO.setup(LED_PIN, GPIO.OUT)
# Blink LED
try:
while True:
finally: