0

Reading Battery voltage on NRF52480
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Reading Battery voltage on NRF52480

by pvonelling on Mon Feb 11, 2019 11:21 am

I can't seem to get the Pin address right on the VDIV (A6/PO.29) in CircuitPython on the board. It doesn't seem to recognize "board.A6".

I'm trying to read it to see when the LiPo battery needs to be recharged using the code provided for other Feather boards.

I'm new to CircuitPython, so I'm sure its something simple that I'm doing wrong, but pointing me in the right direction will be greatly appreciated.

pvonelling
 
Posts: 10
Joined: Tue Oct 28, 2014 9:39 pm

Re: Reading Battery voltage on NRF52480

by adafruit_support_carter on Tue Feb 12, 2019 3:30 pm

Try board.BATTERY instead of board.A6
Code: Select all | TOGGLE FULL SIZE
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-beta.2 on 2019-02-05; Adafruit Feather nRF52840 Express with nRF52840
>>> import board
>>> dir(board)
['__class__', 'A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'AREF', 'BATTERY', 'BLUE_LED', 'D10', 'D11', 'D12', 'D13', 'D2', 'D3', 'D5', 'D6', 'D9', 'I2C', 'L', 'MISO', 'MOSI', 'NEOPIXEL', 'NFC1', 'NFC2', 'RED_LED', 'RX', 'SCK', 'SCL', 'SDA', 'SPI', 'SWITCH', 'TX', 'UART', 'VOLTAGE_MONITOR']
>>>

adafruit_support_carter
 
Posts: 11018
Joined: Tue Nov 29, 2016 2:45 pm

Re: Reading Battery voltage on NRF52480

by pvonelling on Tue Feb 12, 2019 9:14 pm

Excellent. Thanks!

pvonelling
 
Posts: 10
Joined: Tue Oct 28, 2014 9:39 pm

Please be positive and constructive with your questions and comments.