Datasheet

then slowly sink down to 3.2V or so before the protection circuitry cuts it off. By measuring the voltage you can quickly
tell when you're heading below 3.7V
To make this easy we stuck a double-100K resistor divider on the BAT pin, and connected it to D9 (a.k.a analog #7 A7).
You can read this pin's voltage, then double it, to get the battery voltage.
This voltage will 'float' at 4.2V when no battery is plugged in, due to the lipoly charger output, so its not a good way to
detect if a battery is plugged in or not (there is no simple way to detect if a battery is plugged in)
Alternative Power Options
The two primary ways for powering a feather are a 3.7/4.2V LiPo battery plugged into the JST port
or
a USB power
cable.
If you need other ways to power the Feather, here's what we recommend:
For permanent installations, a 5V 1A USB wall adapter (https://adafru.it/duP) will let you plug in a USB cable for
reliable power
For mobile use, where you don't want a LiPoly, use a USB battery pack! (https://adafru.it/e2q)
If you have a higher voltage power supply, use a 5V buck converter (https://adafru.it/DHs) and wire it to a USB
cable's 5V and GND input (https://adafru.it/DHu)
Here's what you cannot do:
Do not use alkaline or NiMH batteries and connect to the battery port - this will destroy the LiPoly charger and
there's no way to disable the charger
Do not use 7.4V RC batteries on the battery port - this will destroy the board
The Feather
is not designed for external power supplies
- this is a design decision to make the board compact and low
#define VBATPIN A9
float measuredvbat = analogRead(VBATPIN);
measuredvbat *= 2; // we divided by 2, so multiply back
measuredvbat *= 3.3; // Multiply by 3.3V, our reference voltage
measuredvbat /= 1024; // convert to voltage
Serial.print("VBat: " ); Serial.println(measuredvbat);
© Adafruit Industries
https://learn.adafruit.com/adafruit-feather-32u4-radio-with-rfm69hcw-
module
Page 28 of 78