Link Search Menu Expand Document

Programming the Adafruit Feather nRF52840 Sense Microcontroller


This web site is a guide to using the Adafruit Feather nRF52840 Sense microcontroller board. The primary audience is students enrolled in ME 120, 121 and 122 at Portland State University.

This web site was started in August 2020. Content is added as time allows and as the need to explain features of the Feather nRF52840 Sense emerge. In Fall 2020 we switched from the Arduino UNO to the Feather nRF52840 Sense for the ME 120, 121 and 122 course sequence.

Adafruit Resources

Local Resources

Quick Start Overview

We recommend that you follow the instructions for initial setup of the Feather for the Arduino IDE. However, before you do that it may be helpful to review the following highly abbreviated instructions.

1. Install the Arduino IDE

We assume you will program the Feather with the Arduino IDE. Consult the Adafruit Learning Guide for instructions on using Circuit Python instead of the Arduino IDE

Go to instructions on installing the Arduino IDE

2. Add the URL of Feather nRF5280 Sense support package to the Arduino Preferences

The default installation of the Arduino IDE only supports a limited number of microcontroller boards. The Feather nRF5280 Sense is not in the default set of boards. Therefore, you need to install libraries in order to compile sketches you want to run on the Feather nRF5280 Sense. There are two types of libraries: One library, referred to as the “board support package” provides code for the core functions of the microcontroller on the Feather nRF52840 Sense. The other type of library supports communication with on-board sensors and external devices.

The Arduino IDE will notify you when updates to the board package is available. It’s a good idea to keep the board package up-to-date and this is achieved by clicking on the link when the Arduino IDE gives you the message that an update is available.

Go to instructions on installing the board package

3. Install libraries for on-board sensors

The Feather nRF5280 Sense has several on-board sensors. You will need to install the libraries for each of those sensors before you can use them. Refer to the pages for the individual on-board sensors from the overview of on-board features page of this website.

Like the board support package, libraries for sensors and external devices are occasionally upgraded. The Arduion IDE will give you a message when updated libraries for sensors and external devices are available. We recommend that you click on the link in the Arduino IDE to update the libraries and install the updates.

4. Write your own code

After you complete the preceding steps, you will be ready to write code for your own projects.

You can review Arduino Programming if you are new to using the Arduino IDE and Arduino-compatible microcontroller boards.

The On-board Sensors page has examples of using the sensors built-into the Feather nRF52840 Sense.

The External Devices has instructions for reading analog inputs (say from sensors with voltage outputs), or running motors or communicating with digital sensors and displays via I2C.