Introduction to Arduino (concept, purpose and application areas)

Arduino एक open-source MICROCONTROLLER board है: कोई operating system नहीं, एक समय में एक program, real-time और ultra-low-power: sensing और controlling के लिए reliable छोटा brain, computing के लिए नहीं।

11 min read · 9 cards · 2 checks

Read in: English · हिन्दी · ગુજરાતી


Theory

वह Board जो एक चीज़ करती है, हमेशा

हर SmartHostel job को एक computer नहीं चाहिए। एक battery room-node को कुछ dead simple करना है: हर मिनट temperature पढ़ना, अगर बहुत गर्म हो तो एक LED blink करना, और लगभग कोई power न पीना ताकि इसकी cell एक साल चले।

यहाँ एक Raspberry Pi absurd overkill है: एक LED blink करने के लिए एक साल तक boot होता OS, एक दिन में batteries drain करते हुए। सही tool है Arduino: बिल्कुल भी computer नहीं, बल्कि एक tiny MICROCONTROLLER जो power की एक फुसफुसाहट पर reliably ONE simple program run करता है। यह Pi का opposite है, और इसका perfect complement।

Theory

Arduino, formally

Arduino एक open-source electronics platform है (hardware AND software) जो एक microcontroller के आस-पास बना है (Arduino Uno एक ATmega328P chip इस्तेमाल करता है)।

Defining fact: इसमें कोई operating system नहीं है। यह एक single program run करता है: एक sketch: सीधे chip पर, हमेशा के लिए repeat करते हुए। कोई multitasking नहीं, कोई files नहीं, कोई Linux नहीं: बस आपका code, metal पर, real time में।

वह simplicity ही इसका purpose है: sensing और controlling को easy, cheap, timing में precise और extremely low-power बनाना। यह ज़्यादा COMPUTE नहीं करता; यह खूबसूरती से SENSE और CONTROL करता है।

Practical

हर sketch का shape: setup एक बार, loop हमेशा के लिए

// Arduino sketch: no operating system, just this, on the chip.
int tempPin = A0;   // analog input (built-in ADC reads it)
int ledPin  = 13;   // digital output

void setup() {              // runs ONCE at power-on
  pinMode(ledPin, OUTPUT);
}

void loop() {               // runs FOREVER
  int reading = analogRead(tempPin);   // ADC: voltage -> number
  if (reading > 600) {                 // too hot?
    digitalWrite(ledPin, HIGH);        // alert LED on
  } else {
    digitalWrite(ledPin, LOW);
  }
  delay(60000);             // wait a minute, then loop again
}

Theory

setup और loop: पूरा Model

हर Arduino sketch में exactly 2 functions हैं, और वे ही mental model हैं:

  • setup() power-on पर एक बार run होता है: pins configure करना, चीज़ें start करना
  • loop() उसके बाद हमेशा के लिए run होता है: endless sense-decide-act cycle

कोई main() नहीं है, किसी OS में वापस लौटना नहीं है, क्योंकि लौटने के लिए कोई OS है ही नहीं: chip बस power ख़त्म होने तक loop() repeat करती है। analogRead भी note कीजिए: Arduino में एक built-in ADC है (sensor lesson का analog-to-digital converter), तो यह analog sensors सीधे पढ़ता है: एक वजह क्यों यह sensing के लिए इतना beginner-friendly है।

Quiz

एक Arduino और एक Raspberry Pi के बीच defining difference क्या है?

  1. Arduino ज़्यादा powerful है और heavier programs run करता है
  2. Arduino एक microcontroller है जिसमें कोई operating system नहीं है, एक sketch run करते हुए; Pi एक OS वाला computer है
  3. Arduino sensors नहीं पढ़ सकता
  4. Arduino Windows operating system run करता है
Show the answer

Arduino एक microcontroller है जिसमें कोई operating system नहीं है, एक sketch run करते हुए; Pi एक OS वाला computer है

Arduino एक bare microcontroller है: कोई OS नहीं, chip पर एक sketch (setup + loop): जबकि Pi Linux run करता एक पूरा computer है। वह OS-versus-no-OS split ही THE distinction है और बाकी हर difference (power, real-time, compute) की जड़ है। Option A इसे invert करता है: Arduino कहीं कम powerful है, और deliberately। Option C false है: sensors पढ़ना, एक built-in ADC के साथ, exactly वही है जिसमें यह excel करता है। Option D nonsense है: यह बिल्कुल कोई OS run नहीं करता, Windows की तो बात ही छोड़िए। Pair याद रखिए: Arduino = microcontroller, कोई OS नहीं; Pi = computer, एक OS के साथ।

Think first

Battery Room-Node के लिए Arduino क्यों?

Room-node बस temperature पढ़ता है और एक alert blink करता है, एक coin cell पर एक साल के लिए। वे 3 Arduino traits दीजिए जो इसे यहाँ right बनाती हैं, हर एक को इस बात के contrast में कि एक Pi क्या गलत करती। फिर tap कीजिए।

Show the answer

(1) Ultra-low power: एक microcontroller microamps पीता है और readings के बीच deep-sleep कर सकता है: एक cell पर एक साल; Linux boot करता एक Pi उस cell को घंटों में drain कर देता। (2) Real-time reliability: कोई OS नहीं का मतलब है कोई background processes नहीं, कोई boot नहीं, कोई crash-to-desktop नहीं: loop बस run करता है, हमेशा के लिए, predictably: एक set-and-forget sensor के लिए ideal। (3) Simplicity और cost: job trivial है (पढ़ना, compare करना, blink करना); Arduino इसे cheaply match करता है, जहाँ एक Pi की computer power waste बैठी रहती। पूरी unit जिस rule की तरफ़ build कर रही है: board को job से match कीजिए: simple/low-power/real-time = Arduino; compute/OS/networking = Pi।

Watch out

Arduino Slips

"Arduino एक OS run करता है": यह नहीं करता: chip पर एक sketch, कोई operating system नहीं: defining trait।

Heavy Compute Expect करना: कोई face recognition नहीं, कोई databases नहीं: यह sense और control करता है; heavy jobs Pi की हैं।

setup/loop भूलना: sketch model (setup एक बार, loop हमेशा के लिए) examinable है; कोई main() नहीं है।

Built-in ADC Miss करना: Arduino analogRead के ज़रिए analog sensors सीधे पढ़ता है: एक real convenience जो name करने लायक है।

Theory

दो Boards, एक Decision

अब आपके पास दोनों boards clearly हैं: Pi, एक computer जो pins poke कर सकता है; Arduino, एक pin-poker जो मुश्किल से एक computer है। कोई भी better नहीं है: वे अलग jobs के लिए अलग tools हैं, और real projects अक्सर दोनों इस्तेमाल करते हैं (Arduinos cheap sensor nodes की तरह जो एक Pi gateway को report करते हैं)। Unit का final lesson इस contrast को एक decision table बनाता है: Raspberry Pi और Arduino के बीच difference, और कैसे choose करें: अगला।

Summary

Key takeaways

  • Arduino एक open-source microcontroller platform है (hardware + software), जैसे Uno का ATmega328P।
  • इसमें कोई operating system नहीं है: यह chip पर सीधे एक single sketch run करता है, हमेशा के लिए।
  • एक sketch है setup() (एक बार run होता है) + loop() (हमेशा के लिए run होता है): endless sense-decide-act cycle; कोई main() नहीं।
  • यह real-time sensing और control, precise timing, और बहुत low power में excel करता है; इसमें एक built-in ADC (analogRead) है।
  • यह heavy computing के लिए नहीं है: कोई databases नहीं, कोई image recognition नहीं (वे Pi की हैं)।
  • Application areas: sensor prototypes, robotics, wearables, home-automation gadgets, data-logging, education।
  • Memory hook: Arduino = एक reliable छोटा brain जो लगभग कोई power न इस्तेमाल करते हुए हमेशा एक चीज़ करता है।

Study this properly

This page is the lesson to read. In Gri-Learn the same topic is a graded deck: the self-checks are scored and your weak topics are tracked. Free to start.

Start this topic

Already have an account? Sign in

More from Introduction to Raspberry Pi and Arduino

Gri-Learn · syllabus-mapped B.C.A. lessons in English, Hindi and Gujarati