Preview build — page text is a draft awaiting human review. Code badges come from real compiles. The flasher is real but not yet hardware-tested; the Playground is still a preview.

Arduino vs Raspberry Pi — microcontroller or mini computer?

Arduino and Raspberry Pi compared on what they run, boot time, power cuts, GPIO, analog input, cost and use cases in India — and why many projects use both.

Community draft — report a mistake

Arduino Uno (microcontroller)Raspberry Pi 4 / 5 (single-board computer)
RunsOne program, no operating systemLinux (Raspberry Pi OS) and many programs at once
Start-upUnder a secondTens of seconds to boot
PowerTens of mA at 5 VSeveral watts; needs a 5 V 3 A (Pi 4) or 5 A (Pi 5) supply
After a power cutJust restartsCan corrupt the SD card if power drops mid-write
GPIO5 V logic, 6 analog inputs3.3 V logic, no analog inputs
TimingMicrosecond-preciseNot guaranteed (Linux decides when your code runs)
Storage32 KB flashmicroSD card or SSD — gigabytes
Typical price in India₹450–800 (clone)Roughly ₹4,000–9,000 depending on model and RAM, plus card, supply and case

They’re often lumped together, but they’re different kinds of device. An Arduino is a microcontroller: one chip running one program forever. A Raspberry Pi 4 or 5 is a small computer running Linux. (The Raspberry Pi Pico is a microcontroller — despite the name, it belongs in the Arduino column.) Prices are indicative and change often for the Pi.

Arduino (or ESP32) is better for…

  • Sensors, relays, motors and alarms that must react instantly and never need a reboot.
  • Unreliable power. After a power cut it’s working again in under a second, with nothing to corrupt.
  • Analog sensors — soil moisture, LDRs, gas sensors. The Pi has no analog input.
  • Low power and low cost. A battery or a phone charger is enough.

Raspberry Pi is better for…

  • Cameras and video, image recognition, face detection.
  • Running servers: Home Assistant, an MQTT broker, a database, Node-RED dashboards, a media centre.
  • Anything needing a screen, keyboard, or lots of storage.
  • Python with full libraries (pandas, OpenCV, AI frameworks).

Pi gotchas in Indian homes

  • Power cuts corrupt SD cards. Use a UPS or a battery HAT, a good card, and shut down properly when you can.
  • Undervoltage. A cheap phone charger causes random crashes and a lightning-bolt warning. Use the official supply or a proper 5 V 3 A / 5 A one.
  • Heat. In summer, a Pi 5 without a cooler throttles. Add a heatsink and fan.
  • 3.3 V GPIO — 5 V sensors need level shifting, exactly as on an ESP32.

The best answer is often both

A typical home setup: a Raspberry Pi in a cupboard runs Home Assistant and an MQTT broker; cheap ESP32 nodes around the house read sensors and switch relays and report to it over Wi-Fi. Each does what it’s good at. Day 23 of our learning path introduces MQTT, and the MQTT sensor node is a ready-made node.

Verdict

Project Pick
Learning electronics, sensors, motors Arduino (best starter boards)
Internet-connected sensor or switch ESP32
Camera, AI, home server, dashboard Raspberry Pi
Whole-house automation Pi as the hub + ESP32 nodes

↑↓ to move · Enter to open