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.

Day 1 of 30 · about 46 minutes

What is a microcontroller? Install the Arduino IDE and upload Blink

Today you build: Your toolchain — Arduino IDE 2 talking to your board

  • Read 10 min
  • Download & install Arduino IDE 2 12 min
  • Board package & driver check 10 min
  • Pick board & port 3 min
  • First upload (Blink) 7 min
  • Check yourself 4 min

Community draft — report a mistake

A microcontroller is a small computer on one chip: a processor, a little memory and a set of pins it can switch on and off or read. It runs one program, starts in milliseconds and sips power — which is why it sits inside washing machines, water pumps and TV remotes.

A development board (Arduino Uno, ESP32 DevKit, Raspberry Pi Pico) puts that chip on a board with a USB port, a voltage regulator and labelled pins, so you can program it from your laptop.

Today has one goal: by the end, your laptop has sent a program to your board and you watched it run. Everything else in the course builds on that.

Which board should you start with?

  • Arduino Uno or Nano — 5 V logic, very forgiving, works with almost every beginner kit. Days 2–15 use it.
  • ESP32 DevKit V1 — 3.3 V logic with Wi-Fi and Bluetooth built in. Cheap in India and the board most of our projects use. Days 16–24 use it.
  • Raspberry Pi Pico W — for MicroPython (day 26).

Not sure? See the best starter boards in India. If you own both an Uno and an ESP32, set up the Uno today — it’s the faster path to a first upload.

What you need today

  • Your board.
  • A USB data cable that fits it. The Uno uses a square USB-B (“printer”) cable; Nano clones use Mini-USB or USB-C; ESP32 DevKits use Micro-USB or USB-C. Many cheap phone cables are charge-only — the board lights up, but the laptop never sees it. Test: plug your phone into the laptop with the same cable. If the phone offers “File transfer”, the cable carries data.
  • A Windows 10/11, macOS or 64-bit Linux computer with about 2 GB free. Phones and tablets can’t run the IDE.
  • Internet for the downloads below.

Step 1 — Install Arduino IDE 2

Get it from arduino.cc/en/software. The page asks for a donation; Just Download skips it. The installer is a couple of hundred MB and grows to roughly 600 MB once installed — a few minutes on home broadband, longer on a phone hotspot.

  • Windows: pick Windows — Win 10 and newer, 64 bits (the .exe). Accept the installer’s defaults. When Windows asks to install device software from Arduino, say Install — those are the drivers for genuine boards.
  • macOS: pick Apple Silicon for M1–M4 Macs or Intel for older ones (Apple menu → About This Mac tells you). Open the .dmg and drag Arduino IDE into Applications.
  • Linux: the AppImage is simplest: right-click → Properties → Allow executing as program (or chmod +x). Ubuntu 22.04 and newer need sudo apt install libfuse2 first. Then add yourself to the serial-port group, or uploads fail with “Permission denied”: sudo usermod -aG dialout $USER, then log out and back in (details).

Open the IDE and wait for the messages in the bottom-right corner to finish. On first start it downloads its board lists and installs Arduino AVR Boards — the package for the Uno and Nano — by itself.

Step 2 — The board package

The IDE needs a package for each family of chips: the compiler and upload tool for that chip.

Uno / Nano: check that it’s there. Click the Boards Manager icon on the left (a board shape), search avr, and Arduino AVR Boards should say INSTALLED. If it doesn’t, click Install — it’s a small download.

ESP32: this one is big, so start it now and read on while it downloads.

  1. File → Preferences (macOS: Arduino IDE → Settings).
  2. In Additional boards manager URLs, paste https://espressif.github.io/arduino-esp32/package_esp32_index.json and click OK.
  3. Boards Manager → search esp32 → esp32 by Espressif Systems → Install.

It’s about 500 MB — the compilers for every ESP32 variant — and often takes 15–25 minutes in India, mostly downloading from overseas servers and unpacking. If it stops with DEADLINE_EXCEEDED or a timeout, click Install again (finished files are kept) or follow the Boards Manager timeout fix.

Step 3 — Which USB chip does your board have?

Your laptop doesn’t talk to the microcontroller directly. A small USB-serial chip near the USB socket translates, and it needs a driver.

Chip Usually on Driver
ATmega16U2 genuine Uno comes with the IDE
CH340 Uno/Nano clones, some ESP32s often automatic, else CH340 fix
CP2102 most ESP32 DevKit V1s often automatic, else CP2102 fix
CH9102 newer ESP32 boards WCH’s CH343 driver

The text is tiny; your phone camera’s zoom reads it. Then plug the board in and check the computer saw it:

  • Windows: right-click Start → Device Manager → Ports (COM & LPT). You want a line like USB-SERIAL CH340 (COM5), Silicon Labs CP210x USB to UART Bridge (COM7) or Arduino Uno (COM3). A yellow triangle under Other devices means the driver is missing.
  • macOS: the port shows up as /dev/cu.usbserial-… or /dev/cu.usbmodem…. If a CH340 board appears twice, see the macOS fix.
  • Linux: /dev/ttyUSB0 (CH340, CP2102) or /dev/ttyACM0 (genuine Uno). On Ubuntu, a CH340 that vanishes a second after plugging in is brltty grabbing it.

Step 4 — Pick the board and port

Use the board selector at the top of the IDE, or the Tools menu:

  • Uno: Tools → Board → Arduino AVR Boards → Arduino Uno.
  • Nano: Arduino Nano. Most clones also need Tools → Processor → ATmega328P (Old Bootloader).
  • ESP32 DevKit V1: Tools → Board → esp32 → ESP32 Dev Module.

Then Tools → Port. Not sure which port is the board? Look at the list, unplug the board, look again — the one that disappeared is yours.

This is the proof that every piece works together.

  1. File → Examples → 01.Basics → Blink. A new window opens with the sketch.
  2. Many boards leave the factory already blinking, so make the change visible: change both delay(1000); lines to delay(200);.
  3. Click Upload (the → arrow at the top left).

The IDE compiles first, then uploads. On an Uno, the output panel ends with something like:

Sketch uses 924 bytes (2%) of program storage space. Maximum is 32256 bytes.
Global variables use 9 bytes (0%) of dynamic memory, leaving 2039 bytes for local variables.

The TX/RX lights flicker, a Done uploading notice appears, and the L LED near pin 13 now blinks fast, five times a second. That fast blink is your code, not the factory’s.

On an ESP32 the compile stops with 'LED_BUILTIN' was not declared in this scope: the ESP32 Dev Module has no standard name for its LED. Add #define LED_BUILTIN 2 as the first line and upload again — your first fixed error. The output ends with Hash of data verified. and Hard resetting via RTS pin..., and the blue LED blinks fast. If it sits at Connecting......, hold the BOOT button until the percentages start.

The three most common day-1 problems

  1. No port in the list, or it’s greyed out. Almost always the cable (charge-only) or a missing driver. COM port not showing goes through it in order.
  2. Uno/Nano: avrdude: stk500_getsync(): not in sync. The upload didn’t reach the chip — wrong port, wrong board, or a Nano clone that needs ATmega328P (Old Bootloader). Full fix.
  3. ESP32: Timed out waiting for packet header. The board wasn’t ready to receive. Hold BOOT during “Connecting…”, or try a shorter cable. Full fix.

You’re done when…

  • The IDE opens and your board’s package shows INSTALLED in Boards Manager.
  • Your board appears under Tools → Port, and disappears when you unplug it.
  • Blink uploaded with no red error, and the LED blinks fast after your delay(200) change.
  • You change it to delay(2000), upload again, and the LED slows down.

Check your understanding

The board lights up but no port appears. What are the two likely causes?

A charge-only USB cable, or a missing driver for the board’s USB-serial chip (CH340 or CP2102).

Why change the delay before your first upload?

Many boards ship with Blink already loaded. A blink that changes speed is proof that your upload worked.

What’s the difference between a microcontroller and a Raspberry Pi 4?

A microcontroller runs one program and starts instantly. A Raspberry Pi 4 is a full computer that boots Linux.

Why does every FlashReady page say whether a part is 3.3 V or 5 V?

A 5 V signal can damage a 3.3 V pin, such as any ESP32 or Pico pin. Day 11 covers this in detail.

Tomorrow you’ll write Blink yourself and learn what every line does.

↑↓ to move · Enter to open