Arduino Nano Overview
Notes
- From the datasheet.
- A development board for rapid prototype development.
- Based on the ATmega329 Microcontroller
- 131 instructions in a RISC architecture
- 32 8-bit GP Registers
- 16 MIPS, 16MHz clock
- 16 bit math
- 1K of EEPROM
- 32K of flash memory
- The nanao has
- 20 digital i/o pins
- 8 analog i/o pins
- But some are used for communications
- For us, this can be programmed in a C/C++ mixture language.
- Language Reference.
- I am exploring this langauge.
- Programs are called sketches
- A convienent interface is the Arduino IDE.
- This provides (at least)
- A code editor
- A compiler
- A downloader
- A serial interface
- This provides (at least)
- The base firmware on the nano includes
- A boot loader/ hardware initialization
- A flash memory writer
- Libraries for handling communications
- usb communcations
- Low level I/O
- Wi-Fi
- We will explore some additional os related hardware as we work our way through.
- For now some basic programming
- By default each sketch has a
void setup()function- This is where you initialize things.
- It is called once before your program begins
- And a
void loop()- After initialization, this is called repeatidly
-
int main() { setup(); while(1) { loop(); } }
- By default each sketch has a
- A simple program
void setup() { pinMode(LED_BUILTIN, OUTPUT); Serial.begin(9600); Serial.println("Initialization Complete"); } void loop() { Serial.println("In the main loop"); digitalWrite(LED_BUILTIN, HIGH); delay(500); digitalWrite(LED_BUILTIN, LOW); delay(500); Serial.println(); }