Arduino Nano
Interactive Arduino Nano pinout with PWM, I2C, SPI and the analog-only A6/A7 marked, old-bootloader upload fix, and a compile-checked blink.
Community draft — report a mistake
The Nano is the Uno shrunk onto a 30-pin stick that plugs straight into a breadboard. Same ATmega328P, same 16 MHz, same libraries — plus two extra analog inputs, A6 and A7, which the Uno doesn’t have.
Most Nanos sold in India are clones with a CH340 USB chip and the old bootloader. If uploads fail with “not in sync”, that one Processor setting is almost always the fix.
Power it from USB, 5 V on the 5V pin, or 7–12 V on VIN. The 3V3 pin comes from the USB chip and supplies only a few tens of mA — fine for a sensor’s logic, not for a Wi-Fi module.
Interactive pinout
Hover or tap a pin for its functions and traps. Filter to light up every I2C, ADC or boot pin.
- Safe for most uses
- Works, with a caveat
- Avoid unless you know why
- Power / control
A6 and A7 are analog-only. They read voltages with analogRead() but cannot be used with digitalRead() or as outputs.
20 mA per pin, 200 mA for the whole chip. LEDs with a resistor are fine. Relays, motors and buzzers need a driver module or transistor.
Breadboard friendly, Uno compatible. Same chip and pins as the Uno, so Uno sketches and libraries work unchanged — just pick the Nano board in the IDE.
Set up your computer
- Install Arduino IDE 2.x from arduino.cc.
- Boards Manager → install Arduino AVR Boards (we compile against avr 1.8.8).
- Tools → Board → Arduino Nano (Tools → Processor → ATmega328P, or "Old Bootloader" for most clones), then pick the port that appears when you plug the board in.
Your platformio.ini:
[env:nano]
platform = atmelavr
board = nanoatmega328
framework = arduino
monitor_speed = 9600[env:nano] platform = atmelavr board = nanoatmega328 framework = arduino monitor_speed = 9600
First program
// First program for the Arduino Nano: blink the on-board "L" LED (D13).
// Clones often need Tools → Processor → "ATmega328P (Old Bootloader)" to upload.
void setup() {
Serial.begin(9600);
pinMode(LED_BUILTIN, OUTPUT);
Serial.println(F("FlashReady: Nano blink"));
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(500);
digitalWrite(LED_BUILTIN, LOW);
delay(500);
}// First program for the Arduino Nano: blink the on-board "L" LED (D13).
// Clones often need Tools → Processor → "ATmega328P (Old Bootloader)" to upload.
void setup() {
Serial.begin(9600);
pinMode(LED_BUILTIN, OUTPUT);
Serial.println(F("FlashReady: Nano blink"));
}
void loop() {
digitalWrite(LED_BUILTIN, HIGH);
delay(500);
digitalWrite(LED_BUILTIN, LOW);
delay(500);
}Components with Arduino Nano
- 74HC595 8-bit shift register (DIP-16) Arduino C++
- A4988 stepper motor driver Arduino C++
- Active buzzer module (high-level trigger) Arduino C++
- BME280 breakout Arduino C++
- Capacitive soil moisture sensor v1.2 Arduino C++
- DHT11 Arduino C++
- DHT22 (AM2302) Arduino C++
- DS18B20 (1-Wire) Arduino C++
- DS3231 real-time clock (RTC) module Arduino C++
- HC-05 Bluetooth serial module Arduino C++
- HC-SR04 ultrasonic sensor Arduino C++
- HX711 load cell amplifier Arduino C++
- INA219 DC current/voltage sensor Arduino C++
- VS1838B IR receiver (38 kHz) Arduino C++
- Dual-axis joystick module (KY-023) Arduino C++
- 4×4 matrix membrane keypad Arduino C++
- L298N dual H-bridge motor driver Arduino C++
- 16×2 LCD + I2C backpack Arduino C++
- LDR light sensor module Arduino C++
- LM35 temperature sensor (TO-92) Arduino C++
- MAX7219 8×8 LED matrix (4-in-1 FC-16 module) Arduino C++
- MPU6050 (GY-521) Arduino C++
- MQ-2 gas sensor module Arduino C++
- NEO-6M GPS module (GY-NEO6MV2) Arduino C++
- nRF24L01+ 2.4 GHz transceiver Arduino C++
- HC-SR501 PIR motion sensor Arduino C++
- Rotary potentiometer (10 kΩ, B10K) Arduino C++
- Push button (6 mm tactile switch) Arduino C++
- RC522 RFID reader (MFRC522, 13.56 MHz) Arduino C++
- 1-channel relay module (5 V coil) Arduino C++
- KY-040 rotary encoder Arduino C++
- SG90 micro servo (9 g) Arduino C++
- KY-038 sound sensor (microphone + LM393) Arduino C++
- SSD1306 OLED 0.96″ (128×64, I2C) Arduino C++
- SX1278 LoRa module (Ra-02, 433 MHz) Arduino C++
- TM1637 4-digit 7-segment display Arduino C++
- 28BYJ-48 stepper motor + ULN2003 driver Arduino C++
- VL53L0X ToF distance sensor Arduino C++
- WS2812B addressable RGB LED strip (NeoPixel) Arduino C++
Common errors
avrdude: stk500_getsync(): not in sync: resp=0x00
Most Indian clones ship with the old bootloader. Set Tools → Processor → "ATmega328P (Old Bootloader)" and upload again.
Port not showing
Install the CH340 driver from wch-ic.com (official source only) and use a data-capable mini-USB cable.
digitalRead(A6) always returns 0
A6 and A7 have no digital circuitry on the Nano. Use analogRead() and compare with a threshold, or move the input to A0–A5.
Projects for Arduino Nano

Carbon monoxide alarm for angithi and sigri heaters (Arduino Nano + MQ-7)
Warns when carbon monoxide builds up from a charcoal heater in a closed room.
1.5 h · India utility

Read-only CAN bus sniffer for your car’s OBD-II port (Nano + MCP2515)
Watch a car’s CAN messages without ever sending one — listen-only, read-only.
2 h · Network & ISP tools

HC-12 433 MHz link range tester for farm and building links (Nano)
Walk the field with it and see exactly where your 433 MHz link stays reliable.
2 h · Network & ISP tools

Heat stress meter for kitchens and workshops (Arduino Nano + DHT22)
The “feels like” temperature for a hot kitchen or shop floor, with a beep in the danger zone.
1 h · Weather

Pressure cooker whistle counter with alarm (Arduino Nano + sound sensor)
Counts the cooker’s whistles and beeps when the dal is done — no more “was that 2 or 3?”
1 h · India utility

Shop customer counter with door chime (Arduino Nano + HC-SR04)
Chimes when someone walks in and counts the day’s customers on a 4-digit display.
1.5 h · India utility

Smart blind stick with ultrasonic obstacle alert (Arduino Nano)
Beeps faster as obstacles get closer.
1 h · Student projects

Motion-sensing staircase step lights that sweep up and down (Arduino Nano + WS2812B)
Steps light up one by one in the direction you walk — only after dark.
4 h · Home automation

Three-phase failure and single-phasing protector for farm motors (Arduino Nano)
Drops the starter when a phase goes missing or low — before the motor burns.
4 h · India utility

Wall-following maze robot with three ultrasonic sensors (Arduino Nano)
Keeps a hand on the left wall — and that’s enough to get out of most mazes.
5 h · Robotics