Arduino vs Rasberry pi

Started by RAHUL QUADY, April 05, 2018, 12:57:21 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

RAHUL QUADY

Hello guys,I want to know the difference between arduino and pi.Please dont start off by telling pi is a processor and uno is a microcontroller.I am a computer science student,and I have been studying about operating systems for a while now, and I came to know about few things like multitasking,multithreading(my fav by the way),scheduling algorithms for processes,System calls and pi needs an OS to function.So I made few assumptions based on what I studied in class about operating systems and I tried to understand the difference between these two.Pi treates every program as a process,and can execute multiple programs,by context switching,or by scheduling with priority.Where as arduino can execute  a single program.
Pi has mutithreading,means if there is problem with one block of code,the next block is executed,if and only if both the blocks are independent of each other.In arduino there is no mulithreading,I guess?.Resources can be utilized in pi through system calls, and there are no system calls for  arduino.All of the functionalities could be only achieved if we hava a good OS,and pi uses linux.
So if my assumptions are misconceptions,I want you to correct me please !.

girishsarwal

First off, this is an RC forum. your question could be better answered if you post it in a computing forum!

Now, to your questions, whoever told you that Arduino is a micro-controller, has been partial with the facts. Arduino is an ecosystem built around AVR ATMEGA microcontrollers. It consists of the development board (with the micro controller and a USB to USART bridge), a cross platform IDE written in Java, a compilation toolchain (based on AVR GCC), a bootstrap firmware, multiple flashing toolchains and a programming interface based on AvrDude.

The RASPI on the other hand is the name of the development board, which is based on the RISC architecture.

So if I had to put things in perspective this is how it'd be:

Raspi : Arduino =

Molecule : Atom
Mountain : Molehill
Computer: Calculator
BCM2807 : AVR Atmega
ARM : AVR
32 bit : 8 bit
~2Ghz clock : ~16 Mhz Clock (Varies)
OS + Peripherals : Bootstrap + peripherals
higher order peripherals such as USB, Main board controller, Audio Controllers etc : Atomic peripherals such as Timers, USART, WDT, etc
Linux : Bootstrap
GCC/Python/etc etc : AVRGCC/ASM
Eclipse/Codeblocks/notepad : Arduino IDE
Main Process (OS runs your program as a fork) : Main Process (Bootstrap code runs your program)
Multithreading : ISRs
Shared Application : Dedicated Application
System Calls (IOCTL) : GPIO/Registers/Clock Edges/ISR

Btw there is an OS that fits on the Atmega 32 and provides services to various peripherals

Hope that helps.
gs
gs

AL HAM SHARI

A Dozen Scratch Built Models , 
VT-Speedster Pro
55' UAV Wing
Model  Rocketry

RAHUL QUADY

Wow,that is something,and to be honest I really dont know half of the terms,you used,and I  will google it.Sorry for asking this question on this forum,I know this is not the right forum to ask.I asked the same question on arduino forum,but told me to ask on pi forum, and they didnt take it well.Anyways thanks again,it would be nice if you could suggest me some books  on embedded systems or some pi books.

girishsarwal

You might want to checkout the following resources

Embedded using avr
Www.maxembedded.com
Www.avr-tutorials.com
Www.extremeelectronics.com

Arduino - easier than avr
Plenty over the internet, do a google search

Pi - almost like programming on pc
Take a course in your favorite programming language that has bindings in Linux such as c/c++, python, Java etc
gs