rpiswag
Posts: 804
Joined: Mon May 19, 2014 10:04 pm

Can the Raspberry Pi Do Everything a Arduino Can?

Thu Apr 02, 2015 2:27 am

Can I Raspberry Pi B+/2B do everything a Arduino can do if you put hats on the pi? What can you do with a Arduino that you can't do with a pi?
A computer's power can't be just measured Gigahertz. It is the same thing with us humans.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: Can the Raspberry Pi Do Everything a Arduino Can?

Thu Apr 02, 2015 3:04 am

rpiswag wrote:What can you do with a Arduino that you can't do with a pi?
Something cheaply.

For a lot of projects an Arduino is adequate, and they cost less that $5 from China these days.

adlambert

Re: Can the Raspberry Pi Do Everything a Arduino Can?

Thu Apr 02, 2015 6:51 am

With the Arduino (talking about the basic ones, UNO etc), you write your sketch and throw it down to the Arduino and it will execute that sketch and nothing else, there's nothing else to think about. The Raspberry Pi can be made to work in a similar way but the Arduino is so straightforward for dedicated tasks.

They can also be extremely tiny (fingernail sized).

If you want a version of Arduino that also run Linux then a genuine YÚN board with a single USB socket an no video out capability is double the price of a Pi.

Personally I enjoy using both, each has its own role where it might be better suited. I am looking forward to receiving my Kickstarter RaspioDuino in a month or two.

drice
Posts: 19
Joined: Fri Dec 19, 2014 3:07 am

Re: Can the Raspberry Pi Do Everything a Arduino Can?

Thu Apr 02, 2015 7:03 am

rpiswag wrote:What can you do with a Arduino that you can't do with a pi?
Deterministic real-time operations. The Pi runs an operating system and uses a complex CPU. That can cause delays in running your code. Depending on what you do, you might never notice this, but the Arduino is fully predictable as to when it will do something and exactly how long it will take. The same can't be said for the Pi.

User avatar
B.Goode
Posts: 8227
Joined: Mon Sep 01, 2014 4:03 pm
Location: UK

Re: Can the Raspberry Pi Do Everything a Arduino Can?

Thu Apr 02, 2015 7:12 am

rpiswag wrote:What can you do with a Arduino that you can't do with a pi?
Directly connect an analogue sensor.

(Of course, you can do that with an RPi as well, if you add an appropriate external ADC module to do it.)

adlambert

Re: Can the Raspberry Pi Do Everything a Arduino Can?

Thu Apr 02, 2015 7:26 am

drice wrote:
rpiswag wrote:What can you do with a Arduino that you can't do with a pi?
Deterministic real-time operations. The Pi runs an operating system and uses a complex CPU. That can cause delays in running your code. Depending on what you do, you might never notice this, but the Arduino is fully predictable as to when it will do something and exactly how long it will take. The same can't be said for the Pi.
Does this assume running one of the Linux OSes?

FreeRTOS or other Real Time OS is available, as well as bare-metal coding with the GPU out of the picture after boot.

toxibunny
Posts: 1382
Joined: Thu Aug 18, 2011 9:21 pm

Re: Can the Raspberry Pi Do Everything a Arduino Can?

Thu Apr 02, 2015 7:28 am

rpiswag wrote:Can I Raspberry Pi B+/2B do everything a Arduino can do if you put hats on the pi? What can you do with a Arduino that you can't do with a pi?
An arduino-compatible hat would cost about 5$ to make...
note: I may or may not know what I'm talking about...


User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Can the Raspberry Pi Do Everything a Arduino Can?

Thu Apr 02, 2015 9:37 am

They can both do ADC, DAC, digital IO, serial, etc. (ADC requiring 3 resistors and a capacitor, for delta sigma ADC, DAC requiring resistors for a resistor ladder). Though it is easier to do realtime on the Arduino, as programming on the bare Raspberry Pi hardware with out an OS is a bit of a challenge.

If you are looking at simple Arduino style projects, though want more ability may I recommend getting a Parallax Propeller Proto Board, and a RPi model B, hook the Proto Board to the RPi model B and use the Propeller to do everything that is Arduino like, and the RPi model B to programming the Propeller.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

henryhanselscott
Posts: 107
Joined: Sun Jan 18, 2015 1:31 pm

Re: Can the Raspberry Pi Do Everything a Arduino Can?

Thu Apr 02, 2015 9:56 am

Deterministic real-time operations.
My thoughts exactly. I use a microcontroller in combination of the pi. The micro handles things like analog, reading high speed inputs, doing time critical tasks. The pi does everything else like data logging, creating files, accessing the net, and using it as a remote device via the web. In reality, learning to use both creates endless possibilities when you combine them.

Henry

User avatar
Douglas6
Posts: 4738
Joined: Sat Mar 16, 2013 5:34 am
Location: Chicago, IL

Re: Can the Raspberry Pi Do Everything a Arduino Can?

Thu Apr 02, 2015 3:38 pm

rpiswag wrote:What can you do with a Arduino that you can't do with a pi?
Run it for months on a coupla coin cells. The AVR chips are much less hungry than a Pi when running, and can be put in a power-down mode (less than a mA if memory serves) when not needed.

henryhanselscott
Posts: 107
Joined: Sun Jan 18, 2015 1:31 pm

Re: Can the Raspberry Pi Do Everything a Arduino Can?

Thu Apr 02, 2015 5:00 pm

Run it for months on a coupla coin cells.
Good point!

One such project that I am considering would be suited well for a micro to run full time on a small solar setup. When it needs the functionality of the pi it would power it up and use it, then power it back down again.

drice
Posts: 19
Joined: Fri Dec 19, 2014 3:07 am

Re: Can the Raspberry Pi Do Everything a Arduino Can?

Thu Apr 02, 2015 11:09 pm

adlambert wrote:
drice wrote:
rpiswag wrote:What can you do with a Arduino that you can't do with a pi?
Deterministic real-time operations. The Pi runs an operating system and uses a complex CPU. That can cause delays in running your code. Depending on what you do, you might never notice this, but the Arduino is fully predictable as to when it will do something and exactly how long it will take. The same can't be said for the Pi.
Does this assume running one of the Linux OSes?

FreeRTOS or other Real Time OS is available, as well as bare-metal coding with the GPU out of the picture after boot.
I was under the impression that caching and pipelining on the ARM SoC made true real-time impossible, but I might be wrong.

User avatar
DavidS
Posts: 4334
Joined: Thu Dec 15, 2011 6:39 am
Location: USA
Contact: Website

Re: Can the Raspberry Pi Do Everything a Arduino Can?

Thu Apr 02, 2015 11:35 pm

drice wrote:
adlambert wrote:
drice wrote: Does this assume running one of the Linux OSes?

FreeRTOS or other Real Time OS is available, as well as bare-metal coding with the GPU out of the picture after boot.
I was under the impression that caching and pipelining on the ARM SoC made true real-time impossible, but I might be wrong.
It is very easy to leave the Caches disabled on an ARM if you code in bare metal (NO OS). And the piplining is very predictable on the ARM, not like others.

Now superscalar execution model on newer ARM's is a potential issue, and coding would have to be very careful to avoid this issue.

Though these issues are why I am looking forward to the Parallax Propeller 2. It will have the ability to easily build a computer around, with 16 cores at 100MIPS each, for a total of up to 160BIPS, and the ability to deal with external memory efficiently. All that and the Propeller 2 is to be as deterministic as the P8X32A Propeller 1.
RPi = The best ARM based RISC OS computer around
More than 95% of posts made from RISC OS on RPi 1B/1B+ computers. Most of the rest from RISC OS on RPi 2B/3B/3B+ computers

Return to “General discussion”