Theory
एक पूरा Computer जो आपकी हथेली में fit होता है
SmartHostel के gate को कुछ heavy करना है: camera से एक face recognise करना और उसे एक database से check करना। यह असली COMPUTING है: एक Arduino-class chip यह नहीं कर सकती, पर gate पर एक laptop absurd है।
Answer है एक Raspberry Pi: एक credit-card-sized board जो, genuinely, एक पूरा computer है: यह एक operating system run करता है, इसमें एक real processor और memory है, एक monitor में plug होता है, और लगभग एक textbook जितनी price का है। यह lesson इससे मिलता है; अगला इसके opposite से मिलता है।
Theory
Raspberry Pi, formally
Raspberry Pi एक low-cost, credit-card-sized single-board computer है जो Raspberry Pi Foundation (UK) ने develop किया, originally schools में computing education promote करने के लिए।
Key word है computer: एक bare microcontroller के उलट, Pi एक proper ARM CPU पर एक पूरा operating system (Raspberry Pi OS, एक Linux distribution) run करता है। तो यह multitask करता है, Python और servers और databases run करता है, internet से connect होता है, और एक monitor और keyboard drive करता है: एक real desktop जो एक board में shrink हो गया।
वह power ही इसका purpose है: एक affordable general-purpose computer AND उन jobs के लिए एक capable IoT/edge brain जिन्हें असली computation चाहिए।
At a glance
एक Raspberry Pi के Key Components
| Component | Purpose |
|---|---|
| SoC (ARM CPU + GPU) | Processor: OS और सारा computation run करता है |
| RAM | Programs run करने के लिए working memory |
| microSD card slot | Storage: OS और files hold करता है (built-in hard disk नहीं) |
| GPIO header (40 pins) | General Purpose Input/Output: sensors और actuators connect करता है |
| USB ports | Keyboard, mouse, storage, peripherals |
| HDMI + Ethernet/WiFi/Bluetooth | Display output और network connectivity |
Theory
GPIO: जहाँ Computer World से मिलता है
एक component Pi को एक IoT board बनाता है, सिर्फ़ एक tiny PC नहीं: GPIO header, 40 General Purpose Input/Output pins की एक row।
GPIO के ज़रिए, Pi sensors पढ़ता है (एक pin को INPUT की तरह) और actuators drive करता है (एक pin को OUTPUT की तरह): building-blocks की sensing और actuation, brain से wired। आप इन pins को code में control करते हैं, typically Python:
वह bridge: एक पूरा Linux computer जो individual electrical pins को ALSO poke कर सकता है: exactly वही है जो एक छोटे board को एक face recognise करने AND एक gate खोलने देती है।
Practical
Minimal GPIO: एक sensor pin पढ़ना, एक LED drive करना (concept)
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN) # pin 17: a motion sensor INPUT
GPIO.setup(27, GPIO.OUT) # pin 27: an LED / relay OUTPUT
if GPIO.input(17): # sensor sees motion?
GPIO.output(27, True) # switch the corridor light on
# The Pi is a full Linux computer that can ALSO poke pins like this.
Quiz
एक Raspberry Pi को एक simple microcontroller board से सबसे ज़्यादा क्या distinguish करता है?
- Pi कोई sensors connect नहीं कर सकता
- Pi एक पूरा computer है जो एक operating system run करता है, एक CPU, RAM और storage के साथ
- Pi में कोई processor नहीं है
- Pi सिर्फ़ एक fixed program run कर सकता है जो इसमें burned है
Show the answer
Pi एक पूरा computer है जो एक operating system run करता है, एक CPU, RAM और storage के साथ
Pi एक computer ही है: एक OS (Linux), एक real CPU, RAM, और microSD storage, तो यह multitask करता है, Python/servers/databases run करता है, और image recognition जैसा heavy computation करता है: वह OS-and-CPU nature ही पूरा distinction है। Option A false है: GPIO आसानी से sensors connect करता है। Option C definition को contradict करता है (SoC ही इसका processor है)। Option D एक MICROCONTROLLER के single-firmware model को describe करता है (Arduino, अगला lesson): exactly Pi के opposite, जो किसी भी computer की तरह कई programs load और run करता है। Pi = छोटा computer; यह framing ज़्यादातर Pi questions answer करती है।
Think first
Gate की Face Recognition के लिए Pi क्यों?
Gate को faces recognise करने हैं और एक local dashboard host करना है। वे 3 Pi capabilities name कीजिए जो इसे इसके लिए right बनाती हैं, इसकी 'it is a computer' nature पर draw करते हुए। फिर tap कीजिए।
Show the answer
(1) Compute power: एक real ARM CPU (और GPU) image-processing / face-recognition libraries run कर सकता है: heavy math जो एक tiny microcontroller touch नहीं कर सकती। (2) एक operating system + storage: Linux और एक microSD इसे locally faces का एक database और एक web dashboard server run करने देते हैं: यह एक पूरा computer है। (3) Rich connectivity + GPIO: cloud तक पहुँचने के लिए onboard WiFi/Ethernet, और gate motor असल में drive करने के लिए GPIO pins। Short में: job को COMPUTING चाहिए, और Pi एक computer है। जब एक task को एक OS, files, networking और real processing चाहिए, Pi वह block है जो इन्हें supply करता है।
Watch out
Raspberry Pi Slips
"Pi एक microcontroller है": नहीं: यह एक OS वाला single-board COMPUTER है: exactly वह distinction जो unit test करती है।
एक Hard Disk Expect करना: Pi एक microSD card पर boot और store करता है; कोई built-in disk नहीं है।
Simple Jobs के लिए Overkill: एक LED blink करने के लिए एक Pi इसकी power और battery waste करती है: simple, real-time, ultra-low-power jobs Arduino के लिए suit करती हैं (आगे): board को job से match करना ही skill है।
GPIO भूलना: GPIO name किए बिना आपने एक छोटा PC describe किया है, IoT board नहीं।
Theory
अब इसके Opposite से मिलिए
Pi heavyweight है: एक computer जो pins भी touch कर सकता है। अगला lesson featherweight से मिलता है, Arduino: बिल्कुल भी computer नहीं, बल्कि एक bare MICROCONTROLLER जो लगभग कोई power न इस्तेमाल करते हुए एक simple, reliable, real-time job करता है। यह समझना Arduino क्या NOT है (एक OS, multitasking, heavy compute) Pi समझने का आधा हिस्सा है: और इसके बाद का difference lesson इस contrast को उस decision में बदल देता है जो हर IoT project को लेनी होती है।
Summary
Key takeaways
- Raspberry Pi Raspberry Pi Foundation का एक low-cost, credit-card-sized single-board COMPUTER है।
- यह एक ARM CPU पर एक पूरा OS (Linux) run करता है: multitasking, Python, servers, databases, heavy compute।
- Components: SoC (CPU+GPU), RAM, microSD storage (कोई hard disk नहीं), USB, HDMI, Ethernet/WiFi/Bluetooth, 40-pin GPIO।
- GPIO pins sensors (input) और actuators (output) connect करते हैं: computer से physical world तक का bridge।
- Application areas: edge computing, IoT gateways, vision projects, home automation hubs, education, robotics।
- Pi इस्तेमाल कीजिए जब job को real computing, एक OS, storage या networking चाहिए।
- Memory hook: Pi आपकी हथेली में एक पूरा computer है जो pins भी poke कर सकता है।