Raspberry Pi
Raspberry Pi
Module - 4
Arduino Rpi
Arduino comes with an 8- The Raspberry Pi comes with a 64-
bit microcontroller. bit microprocessor.
Raspberry Pi has 1GB of RAM.
Arduino has 2 Kilobytes of RAM.
Raspberry Pi runs an operating system,
Arduino has no operating system. It which is usually Linux. Rpi supports any
can only run programs that were programming while operated in Linux.
compiled for the Arduino platform, A Raspberry Pi is much more
which mostly means programs sophisticated in this regard, having a
written in C++. Video output, an HDMI port, an SD card
port, an Audio jack, CSI camera port, DSI
In terms of I/O, Arduino has an USB- display port, 4 USB 2.0 ports which you
B port that can be used by a can use to attach USB devices, a Gigabit
computer to transfer new programs Ethernet jack, Wireless LAN, Bluetooth
to run, a power input and a set of 4.2 and I/O pins (GPIO) as well. Lots of
I/O pins. things.
Arduino is much more simple.
It’s a mini computer.
ARaspberry Pi consumes more power
Arduino consumes much less power than Arduino (700+ mA).
(~50 mA idle).
Raspberry Pi
Raspberry Pi board
comprises RAM,
processor, CPU, GPU,
Ethernet port, Xbee socket,
UART and various
interface for other
external devices.
def button_callback(channel):
print("Button was pushed!")
GPIO.add_event_detect(10,GPIO.RISING,callback=button_callb
ack) # Setup event on pin 10 rising edge
Running
GPIO.cleanup() the code:
# Clean up $ python3
push_button.py
Sample Code-3: SPI LCD with RPi
# The second character
# Clear display msg = [0x7c]
msg = [0x76] msg.append(i)
spi.xfer2(msg) result = spi.xfer2(msg)