Arduino Nano Original Documentation
The Arduino Nano Original is a small, complete, and breadboard-friendly microcontroller board based on the ATmega328P ( datasheet ) and is similar to the Arduino Uno but in a more compact size. It has 14 digital input/output pins, 6 analog input pins, 16 megabytes of flash memory, and can operate at a clock speed of up to 16MHz.
Microcontroller: ATmega328P
Operating Voltage: 5V
Input Voltage: 7-12V
Digital I/O Pins: 14
Analog Input Pins: 6
Flash Memory: 16 MB
Clock Speed: up to 16MHz
Size: 18 x 45 mm
### Example 1: Blinking LED
This example demonstrates how to use the Arduino Nano Original to blink an LED connected to digital pin 13.
```c
const int ledPin = 13; // choose the pin for the LED
void setup() {
pinMode(ledPin, OUTPUT); // set the LED pin as an output
}
void loop() {
digitalWrite(ledPin, HIGH); // turn the LED on
delay(1000); // wait for 1 second
digitalWrite(ledPin, LOW); // turn the LED off
delay(1000); // wait for 1 second
}
```
Hardware Requirements
Arduino Nano Original board
LED
Breadboard
Jumper wires
Example 2: Reading Analog Input
This example demonstrates how to use the Arduino Nano Original to read analog input from a potentiometer connected to analog pin A0 and print the value to the serial monitor.
```c
const int sensorPin = A0; // choose the analog input pin
void setup() {
Serial.begin(9600); // initialize serial communication
}
void loop() {
int sensorValue = analogRead(sensorPin); // read the analog input
Serial.print("Sensor value: ");
Serial.println(sensorValue);
delay(100); // wait for 100ms
}
```
Hardware Requirements
Arduino Nano Original board
Potentiometer
Breadboard
Jumper wires
### Example 3: Communication with Serial Monitor
This example demonstrates how to use the Arduino Nano Original to send and receive data through the serial monitor.
```c
void setup() {
Serial.begin(9600); // initialize serial communication
}
void loop() {
if (Serial.available() > 0) { // check if data is available in the serial buffer
String message = Serial.readStringUntil('
'); // read the incoming data
Serial.println("Received message: " + message);
}
}
```
Hardware Requirements
Arduino Nano Original board
Computer with serial monitor software (e.g., Arduino IDE, Serial Monitor)
Note: Make sure to choose the correct board and port in the Arduino IDE before uploading the code to the Arduino Nano Original.