DEV Community

loading...

Discussion on: Arduino vs. Raspberry Pi

Collapse
mx profile image
Maxime Moreau

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 Author

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

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.