Siksha Sarovar

Siksha Sarovar (sikshasarovar.com) is a free educational web application that helps students in India learn programming and prepare for academic and competitive exams. The platform offers structured coding courses (C, C++, Python, Java, HTML, CSS, PHP, Power BI, AI, Machine Learning, Data Science), complete university curriculum notes for BCA/MCA students with previous year question papers, Class 10 and Class 12 CBSE/HBSE school notes, and dedicated preparation material for SSC, UPSC, Banking, Railway and other government exams. Browsing the site is completely free and requires no account. Users may optionally sign in with Google solely to save their learning progress, quiz scores and personal preferences across devices.

Privacy Policy | Terms of Service | Contact Siksha Sarovar | About Siksha Sarovar

v4.0.9 · PWA
Siksha Sarovar logo
Siksha Sarovar
Your Learning Universe

Siksha Sarovar is a free e-learning platform for coding courses, BCA university notes and competitive exam preparation. Optional Google sign-in saves your learning progress across devices.

Initializing knowledge base…
Compiling modules 0%

3.6 Programming the Arduino: Anatomy and IDE Workflow

Lesson 20 of 31 in the free Internet of Things (IoT) notes on Siksha Sarovar, written by Rohit Jangra.

3.6.1 The Arduino Philosophy: Hardware Abstraction

Arduino is more than a board; it is an "Abstraction Framework" that allows engineers to program complex 8-bit and 32-bit hardware using a simplified C++ syntax without writing directly to memory registers.

3.6.2 Detailed Technical Anatomy of the Arduino Uno (Rev 3)

ComponentDetailed Technical SpecificationPurpose
MicrocontrollerMicrochip ATmega328P (8-bit RISC)The Brain / Logical processor
Clock Speed16 MHz (Crystal Oscillator)Timing and execution speed
Logic Voltage5V DCOperating voltage for internal gates
Digital Pins14 (6 support 8-bit PWM)Binary Input/Output
Analog Pins6 (10-bit Successive Approx ADC)Reading sensor voltages (0-1023)
Memory Map32KB Flash, 2KB SRAM, 1KB EEPROMProgram / RAM / Persistent storage
CommunicationsUART (Serial), I2C (Wire), SPITalking to peripherals

3.6.3 The Arduino IDE (Integrated Development Environment)

  • Sketch: The unit of source code (.ino).
  • Toolchain: Uses AVR-GCC cross-compiler to transform C++ into a .hex binary.
  • Serial Monitor: A built-in terminal for debugging at various baud rates (e.g., 9600, 115200).
  • Bootloader: Tiny program (0.5KB) pre-installed on the chip that allows it to receive code via USB without an external hardware programmer.

3.6.4 Programming Paradigm: The Infinite Loop

Unlike standard C programs starting at main() and exiting, Arduino uses:

  1. setup(): Called exactly once at boot or reset. Used for Serial.begin(), pinMode(), and sensor initialization.
  2. loop(): An infinite while-loop that runs the main business logic (Sensing -> Processing -> Actuating).