Average rainfall 2001-2016, global tropics

Map: Average rainfall 2001-2016, global tropics

ide: Arduino Nano project preparation

Introduction

Building a “stand alone” Arduino project in most cases also equals changing from a large Arduino board (e.g. Uno) to a smaller board like Nano or [Pro Micro]. Other companies produce Arduino compatible boards that are as small, or smaller, and that also contain some built in features. But let us save that for a later post. In this post you will use an Arduino Nano board as that is almost like a smaller version of the Uno board.

Setup Arduino IDE for Arduino Nano

When you did setup Arduino IDE the first time you probably did choose a board - usually Uno, from the menu:

Tools -> Board

Change the Board to Nano as illustrated in the figure.

Change to the Nano board in the Arduino IDE.

Then you also have to give the usb-port to which you have connected your Arduino Nano, also done from the menu:

Tools -> Port

Change connection port in the Arduino IDE.

There are different versions available for both the Arduino IDE and the Nano board. You have to make sure that you have the correct Processor set. The version of the Arduino IDE at time of writing this (January 2020) has the ATmega328P as default Processor (in Nano boards from 2018 or newer); for older boards you need to set the Processor to ATmega328P (Old Bootloader):

Tools -> Processor

Change Processor for the Nano board in the Arduino IDE.

Test board connection

As you have different options regarding the Arduino IDE, the Processor on the Nano and probably more than one USB port on you computer you might have to do a bit of trial error before getting it all correctly setup. Below is a simple sketch to use for trying your connection setup. Attach a led to pin D7 and another to ground (GND) on your Arduino Nano board. If you use a standard LED, the longer leg should be connected to D7 (positive), and you should use a 220 Ohm resistor. But you can skip the latter if you are only going to try the connection.

Wiring for testing the connection to an Arduino Nano Board.

int ledPin = 7;  

void setup() {
  // put your setup code here, to run once:

pinMode(ledPin, OUTPUT);      // sets the digital pin as output

}

void loop() {

  digitalWrite(ledPin, HIGH);   // sets the LED on
  delay(1000);                  // waits for a second
  digitalWrite(ledPin, LOW);    // sets the LED off
  delay(1000);                  // waits for a second

}

My settings

This is how I got my older Nano board to connect using the USB port on the right side of my Macbook Air 2017.

Change to the Nano board in the Arduino IDE.