Theory
આખું unit જે પ્રશ્ન સુધી પહોંચ્યું
તમે બંને boards ને મળ્યા છો. હવે exam નો payoff question: "Differentiate between Raspberry Pi and Arduino," અને દરેક project ને આવતો practical પ્રશ્ન: મારે કયું વાપરવું?
એક idea આખી comparison ને organize કરે છે: Pi એક COMPUTER છે, Arduino એક MICROCONTROLLER છે. નીચેની દરેક row આ જ વિચારથી આવે છે. અને "કયું better છે?" નો સાચો જવાબ neither છે: બંને અલગ tools છે અને કયું FITS થાય છે એ જાણવી actual skill છે. હંમેશાની જેમ પહેલાં similarities.
Theory
Similarities (પહેલાં આ કહો)
બંને boards rivals માત્ર એટલા માટે છે કારણ કે ROLE માં તેઓ ખૂબ alike છે:
- બંને small, affordable prototyping boards છે
- બંને pins દ્વારા sensors અને actuators connect કરે છે
- બંને IoT devices build કરવા વપરાય છે
- બંને પાસે huge communities, tutorials અને add-ons છે
એક જ lab માં, એક જ students માટે, એક જ shelf પર બંને boards આવે છે. તેમને અલગ પાડે છે INTERNAL nature: computer versus microcontroller. એ જ table ના બીજા બધાં differences બનાવે છે.
At a glance
Raspberry Pi vs Arduino (decision table)
| Aspect | Raspberry Pi | Arduino |
|---|---|---|
| Type | Single-board COMPUTER (microprocessor) | MICROCONTROLLER board |
| Operating system | Linux ચલાવે છે | કોઈ OS નહીં: એક sketch ચલાવે છે |
| Processing / memory | High; GBs of RAM + microSD | Minimal; KBs |
| Power use | Higher, mains-oriented | Very low, battery-friendly |
| Real-time control | OS latency/jitter ઉમેરે છે | Excellent, deterministic |
| Analog input | NONE natively (external ADC જોઈએ) | Built-in ADC / analog pins |
| Programming | OS પર Python + many languages | Arduino IDE દ્વારા C/C++ sketch |
Formula
Choosing rule, box માં
Preference નહીં, JOB પ્રમાણે નિર્ણય કરો:
- computing, OS, networking, vision, databases જોઈએ → Raspberry Pi
- simple, real-time, low-power sensing અને control જોઈએ → Arduino
અને professional નો જવાબ: બંને વાપરો. Cheap Arduino nodes sense અને report કરે; Raspberry Pi gateway aggregate કરે, compute કરે અને cloud સાથે connect કરે. SmartHostel બરાબર આવું કરે છે: Arduino room nodes, hallway માં એક Pi.
Quiz
એક project ને કોઈ extra components વગર ANALOG temperature sensor સીધો read કરવો છે. કયું board આ natively કરી શકે છે, અને શા માટે?
- Raspberry Pi: તેનો powerful CPU કોઈપણ signal read કરી શકે છે
- Arduino: તેમાં built-in ADC અને analog input pins છે; Pi પાસે natively નથી
- બંને analog ને identically read કરે છે
- બંનેમાંથી કોઈ analog sensors read કરી શકતું નથી
Show the answer
Arduino: તેમાં built-in ADC અને analog input pins છે; Pi પાસે natively નથી
Arduino પાસે built-in analog input pins અને ADC છે, એટલે analogRead analog sensor માંથી સીધું value ખેંચે છે: કોઈ extras નહીં. Raspberry Pi વધુ powerful હોવા છતાં તેની પાસે NO native analog input છે: GPIO માત્ર digital છે, તેથી analog sensor માટે EXTERNAL ADC chip જોઈએ. આ exam નું favourite concrete, counter-intuitive difference છે: weaker board એક ચોક્કસ કામમાં જીતે છે, કારણ કે raw compute power અને analog front-end હોવું એક જ વાત નથી. Option A processing power ને analog capability સાથે confuse કરે છે. Lesson: વધારે powerful હોવું એટલે દરેક બાબતમાં વધારે capable હોવું નથી.
Think first
SmartHostel નું compute layout design કરો
SmartHostel માં 40 battery room-nodes છે (temperature read કરીને report કરે) અને એક gate છે જે face recognition + dashboard ચલાવે છે. દરેકને Arduino કે Pi assign કરો અને એક જ board બધે વાપરવા કરતાં બંને વાપરવા કેમ better છે તે સમજાવો. પછી tap કરો.
Show the answer
Arduino 40 room-nodes માટે: cheap, ultra-low-power (cell પર એક વર્ષ), real-time અને analog temperature ને સીધું read કરે છે. 40 Pis wasteful, power-hungry અને expensive થાય. Raspberry Pi gate માટે: face recognition અને dashboard host કરવા real computing, OS અને storage જોઈએ; Arduino કરી શકતું નથી. બંનેનો ઉપયોગ optimal છે કારણ કે jobs અલગ છે: દરેક board ને તેના job સાથે match કરો. આ tiered pattern, એટલે કે ઘણા cheap microcontroller nodes થોડા capable computer-gateways ને report કરે, એ જ real IoT કેવી રીતે scale થાય છે, અને આ કહેવું full-marks answer છે.
Watch out
Comparison slips
"Pi ફક્ત better Arduino છે": બંને DIFFERENT categories છે (computer vs microcontroller), better/worse નહીં. Arduino power, real-time અને native analog માં જીતે છે.
Pi પાસે native analog નથી એ ભૂલવું: Exam નું favourite gotcha: analog sensors માટે Pi ને external ADC જોઈએ.
Similarities skip કરવી: બંને small, affordable, sensor-connecting IoT boards છે: grade-earning point.
One-board absolutism: Real projects બંને combine કરે છે (nodes + gateway); આ pattern નું નામ લો.
Theory
Unit 4 closes: brain સમજાયું
Device, તેના building blocks અને એ આપતા બે boards બધું map થઈ ગયું છે, અને દરેક IoT builder ના decision પર unit પૂરું થાય છે. Unit 5 workbench ની બહાર IoT ને WORLD માં જોશે: smart city, smart home અને health and lifestyle ના ત્રણ case studies, જ્યાં ચારેય units ના ideas scale પર કામ કરે છે. એક hostel ના tank થી આખા city ના traffic સુધી: final unit.
Summary
Key takeaways
- Similarities: બંને small, affordable prototyping boards છે જે sensors/actuators connect કરીને IoT devices build કરે છે.
- Core split: Pi single-board COMPUTER છે (Linux ચલાવે છે); Arduino MICROCONTROLLER છે (OS નહીં, એક sketch).
- Pi: high processing, GBs RAM, higher power, many languages; Arduino: minimal, KBs, ultra-low-power, C/C++ sketch.
- Real-time: Arduino deterministic છે; Pi નો OS latency ઉમેરે છે.
- Analog: Arduino માં built-in ADC છે; Pi પાસે NO native analog input નથી (external ADC જોઈએ): classic gotcha.
- Job પ્રમાણે પસંદ કરો: compute/OS/vision → Pi; simple/real-time/low-power → Arduino; real projects બંને વાપરે છે.
- Memory hook: Pi computes, Arduino controls; nodes gateways ને report કરે છે.