0% found this document useful (0 votes)
10 views5 pages

Arduino vs Raspberry Pi Comparison Guide

Uploaded by

SAQUEBA MAHIR
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views5 pages

Arduino vs Raspberry Pi Comparison Guide

Uploaded by

SAQUEBA MAHIR
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

Feature Arduino Raspberry Pi

Type of Device Microcontroller Mini computer


Controls electronics (sensors, Runs programs, connects to internet,
Main Use
motors) display, etc.
No OS (runs one program at a Has an OS (like Windows for
Operating System
time) computers)
Programming
C/C++ (Arduino IDE) Python, Java, Scratch, etc.
Language
The Arduino UNO is a small computer (called a microcontroller) that helps you control lights,
sensors, motors, buzzers, etc. It has different pins you can connect wires to.

HARDWARE

Feature Arduino Raspberry Pi


Processor Simple (8-bit or 32-bit) Advanced (64-bit quad-core)
RAM Very small (2KB–256KB) 1GB–8GB
Internet Needs extra parts Built-in Wi-Fi and Ethernet
USB/HDMI No (except for programming) Yes – supports keyboard, mouse, monitor

POWER CONTROL

Feature Arduino Raspberry Pi


Power Consumption Very low Higher
Controls Hardware Excellent (Real-time control) Possible, but slower
Startup Time Instant Takes time to boot up
Multi-tasking No Yes (can run multiple apps)

EXAMPLE PROJECTS

Project Best Option


Blinking LED Arduino
Home automation with internet control Raspberry Pi + Arduino
Weather station Arduino for sensors + Pi for display
Coding games or Python projects Raspberry Pi
Robotics (basic motors/sensors) Arduino

ARDUINO UNO PIN EXPLANATION


1. Power Pins

Pin Use
5V Gives 5 volts – used to power sensors and modules
3.3V Gives 3.3 volts – used for low-power modules
GND Ground – always connect this to your device’s GND
Vin If you use a battery or adapter, this is where it comes in

2. Digital Pins (0–13)


Digital means only two values:
➤ ON or OFF
➤ HIGH (5V) or LOW (0V)

Used For:

 Turning an LED ON/OFF


 Checking if a button is pressed or not
 Controlling a buzzer or motor

These pins are used to turn things ON or OFF (like LEDs or buzzers), or read ON/OFF signals
(like buttons).

Pin Number Use


0–13 Digital input/output
Pin Number Use
3, 5, 6, 9, 10, 11 Can give PWM signal (like fake analog output) – look for ~ symbol
Pin 0 & 1 Also used for USB communication – avoid using if you're uploading code

3. Analog Pins (A0–A5)


 Analog means many values between 0 and 1023 (not just ON or OFF)
 Used to read signals that change smoothly
Reading data from temperature sensors, light sensors, moisture sensors, etc.

These pins read values from sensors like temperature or light sensors.

Pin Use
A0 to A5 Read analog signals (values between 0 and 1023)

4. Special Pins

Pin Use
AREF Reference voltage (used in advanced analog reading)
RESET Used to restart your Arduino manually
ICSP For programming the Arduino directly – usually not used by beginners

LED BLINKING ON ARDUINO

CIRCUIT DIGRAM
LED BLUE
CATHODE-GND
ANODE-D2
LED GREEN
CATHODE-GND
ANODE- D3

CODE

Line/Section What It Does


void setup()
Runs once when the Arduino starts. Initializes serial and
pin settings.
This command starts communication between the Arduino and
your computer (via the Serial Monitor).
Its used to send messages from Arduino to your computer.
[Link](9600); To receive inputs from your computer
Serial-The communication port
begin(9600)- Starts at speed 9600 bits per second (called baud
rate)
This command tells Arduino how to use a pin — either as an
INPUT or an OUTPUT.
pinMode(3, OUTPUT);
Example
If you're turning on an LED → OUTPUT
If you're reading a button press → INPUT
Sets pin 3 as an output (for LED).
pinMode(2, OUTPUT); Sets pin 2 as an output (for LED).
[Link]("hello
world"); Prints "hello world" in Serial Monitor.
Line/Section What It Does
void loop() Runs continuously in a loop.
int n; Declares a variable n to store the input number.
[Link]("Enter the
number:"); Asks the user to type a number.
while ([Link]()==0) {} Waits until user types a number in Serial Monitor.
n = [Link](); Reads the number entered and stores it in n.
[Link](n); Prints the entered number.
if(n % 2 == 0)
Checks if the number is even (remainder is 0 when
divided by 2).
digitalWrite(2, HIGH); Turns ON LED connected to pin 2.
[Link]("ON"); Prints "ON" in Serial Monitor.
delay(1000); Waits for 1 second (1000 milliseconds).
Turns OFF LED on pin 2.
Example
digitalWrite(2, LOW);
digitalWrite(pin, HIGH);
Sends 5 volts to the pin → turns it ON
digitalWrite(pin, LOW);
Sends 0 volts to the pin → turns it OFF
[Link]("OFF"); Prints "OFF".
else
If number is not even (i.e., odd), then run this
block.
digitalWrite(3, HIGH); Turns ON LED connected to pin 3.
[Link]("ON"); Prints "ON".
delay(1000); Waits for 1 second.
digitalWrite(3, LOW); Turns OFF LED on pin 3.
[Link]("OFF"); Prints "OFF

OUTPUT

You might also like