Message Boards Message Boards

Your opinions on Arduino vs. Raspberry Pi

Ok folks,  I am very much interested in external device control using microcontrollers.  Does anyone have any experience with both devices (Arduino and Raspberry Pi)?
Please, share your experience and how you prefer one over the other in terms of  interface capability with Mathematica.

I have a project where I must combine 4 environmental sensors, 5 motors and  capture video for  image processing .  I would like to use Mathematica to do all the controlling and processing.  I prefer the Linux platform, but will like to hear if your experience is with Windows.
POSTED BY: Jose Calderon
8 Replies
Posted 10 years ago
I agree with Jari's comments, I was being over simplistic. A useful tutorial can be found at http://openlabtools.eng.cam.ac.uk/Resources/Datalog/RPi_ADS1115/.
POSTED BY: bjs
Posted 10 years ago
@bjs

It is really an overstatement to say that Arduino, in its' AVR incarnations, has an operating system. Rather, it has statically linked runtime and libraries, which exist explicitly mostly on source level, but not really on machine code level. This doesn't mean Arduino wouldn't be trivially capable of hard real time operation. Partially this is supported by cycle-predictable nature of AVR microcontroller.

Raspberry Pi with Linux - Mathematica on top - is a different beast. Even if you ditched the kernel, you couldn't run similarly cycle-exact real time processes, because CPU and its' interfaces are not designed for this.

For best of both worlds, you probably want to use Arduino as a sort of real time slave under control of Raspberry Pi (or other fully equipped computer with sufficient interface to Arduino). Especially if you want to achieve microsecond-level (or, realistically, anything that has hard demand for below one second) response latencies, splitting tasks between the microcontroller for that and complex computation for the "real" computer is likely to be mandatory. At least if you're a hobbyist.
POSTED BY: Jari Kirma
Posted 10 years ago
I think this is a good discussion. There are pros and cons when considering which platform to use in a given situation. I'm trying to generated some interest in the mbed platform based on the ARM Cortex family of microcontrollers. I think it should also be considered in the set of connected devices supported by the Wolfram Language. Here is a link to a post I made regarding the mbed:

mbed Platform Discussion
POSTED BY: David G
Posted 10 years ago
There is a fundamental difference between the Arduino and the Raspberry PI. The Arduino has a Real Time Operating Systen and the RPi does not. Linux like Windows and MacOS has a stochastic operating system meaning that the sheduler moves different processes in and out of execution according to a events and work load etc at a given time. This is basically a random process so the RPi cannot do anything that requires really exact timing. For operations that work over second to hours this hardly makes a difference but if you try to sample fast waveforms serious and unpredictable errors can result. The Arduino with its real time operating system does not suffer from this problem so is much better for data aquisition. The flip side of this of course is that the Arduino has very limited comutational ability compared with the RPi Linux system where there are thousends of applications of all kinds. The two boards therefore work very well with each other if you try to exploit the advantages of each.
POSTED BY: bjs
There are new boards based on Arm like Udoo Quad, which provides more than 4 times the processing and memory of Rasberry PI, as well as sata interface, but also integrate arduino on the board. You want both functions. I understand that Wolfram is looking to expand the Arm universe and has a Beta for BeagleBoard, I sure hope they include Udoo.

There are also various boards gertduino and such that allow you to integrate an arduino and a Rasberry PI.

All sorts of scientific analysis and measurement tools are in reach with a Udoo Quad and varius sensors.

-Kimberly Peacock
POSTED BY: Kimberly Peacock
I think we won't have to choose one or the other. RPi is good at some things and clumsy at others. Arduino the same. There's enough interest in this, though, that there should be a wealth of hybrid solutions. This is a pretty good technical reference, although this particular page probably supplies way more information than you need.

Hth,
Fred
POSTED BY: Fred Klingener
If Mathematica is to do all the processing, then I think your only choice is the Raspberry PI.  Arduino programs are written in C or WIRING in a dedicated development environment and downloaded to the board.  For Mathematica to do all the processing, it would have to be run on a remote computer and send commands and/or data to the Arduino.
POSTED BY: Carl Lemp
Well, as I know, Arduino is quite different thing. It's just a PROTOTYPING board, not a computer. You will need to flash your code into it via USB every time you need it to be executed. RPi is a full-functional linux-based computer. You can just connect RPi to the ethernet via USB Wi-Fi module and controll all your stuff via SSH WITHIN RPi wirelessly. RPi is much more convinient and functional then Arduino. 

(it can be that I don't know some Arduino products)
POSTED BY: Himura Kazuto
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract