DEV Community

Cover image for Arduino vs. Raspberry Pi
Gurpreet Singh
Gurpreet Singh

Posted on

Arduino vs. Raspberry Pi

As a new starter to IOT world, I would like to ask you which device or platform is better to start with. I never write any python code before but I am sound in JavaScript and NodeJS.

Top comments (6)

Collapse
 
mx profile image
Maxime Moreau • Edited

Hi!
They are two different piece of hardware.

Arduino are microcontrollers and RaspberryPI are computers like.
The main difference is that, on RPI you have an Operating System to manage pretty much everything, as your computer does. On the other hand, Arduino only have some small microcontroller chip so you don't have an Operating System.

In the IoT world, you can use both and it's very common:

  • RaspberryPI to have a web server, a database...
  • Arduino to connect with the real world through sensors, they're designed to do so! They have low latency to read & write I/O as they don't have an Operating System doing a lot of things (we're talking ms here, but that can be very important of a robot for ex).

More generally, we're using microcontrollers to handle I/O and some kind of server to have a database, manipulate the data...

PS: I've simplified a lot of things, Arduino aren't microcontrollers, they are board with a microcontroller and a lot of other stuff to remove the hassle to work with these microcontrollers (resistors, quartz...) But the main idea is here and correct :)

Collapse
 
gsin11 profile image
Gurpreet Singh

Thanks for sharing low level understanding. In addition, can we use same sensors on both the boards?
Idea is, if I buy Arduino kit with all the sensors or visa-versa will they work on RP?

Collapse
 
mx profile image
Maxime Moreau • Edited

Not all of them will work on the PI.

1) We can't use analog sensors on the PI because it has no analog input (you can add an analog input module to the PI if necessary but yeah... Arduino is good for that!).

2) As for digital sensors, you have to check very carefully that the sensor output is 3.3V because the Pi's digital inputs will be damaged by a higher voltage /!\ Or sometimes we can "transform" 5V output to 3.3V but we're loosing accuracy.

Collapse
 
blindfish3 profile image
Ben Calder

It really depends what you hope to achieve. I've dabbled with Arduino and coding it isn't difficult; but dealing with serial port connectivity issues can be frustrating and it also helps to have a reasonable understanding of electronics.

I haven't tried Raspberry Pi but the impression I have is that Arduino is much more low level and that RP is more appropriate for 'always connected' IoT devices.

Collapse
 
gsin11 profile image
Gurpreet Singh

Thanks for your overwhelming response guys... I am ordering following stuff to start with:
Boards
Raspberry Pi (any, preferred 3/4)
Arduino Mega/UNO
 
Equipments
Breadboard
Micro USB to Ethernet Dongle (In case PI has no WiFi)
MicroSD card (if available)
Micro HDMI to HDMI cable
Jumper wires
Ribbon wire
RGB LEDs
Single Channel rely
LCD module
push buttons
Resistors
12 Volt DC motor
 
Sensors
ESP8266 wifi module
moisture sensor modules
LDRs
IR sensors
Ultra sonic sensors
PIR sensors

Let me know in case there can be any amendments needed?

Collapse
 
shadowtime2000 profile image
shadowtime2000

I think you should go for Raspberry Pi because you can also install NodeJS and run javascript there. Arduino is just a controller while a Raspberry Pi is a computer on a small board.