Skip to content

Waveshare LoRa SX1262 Battery Monitor #16675

Answered by robert-hh
Iangwm asked this question in RP2040 / Pico
Discussion options

You must be logged in to vote

Shouldn't it be read_u16() * 3.3 * 3 / 65535. The reference voltage is 3.3v. So read_u16() * 3.3 / 65536 returns the actual voltage at GP26. Look as well at the notes at https://docs.micropython.org/en/latest/rp2/quickref.html#adc-analog-to-digital-conversion. The ADC object should be created by the Pin reference (like 26, or "GP26" or Pin.board.GP26) and NOT the channel number.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Iangwm
Comment options

Answer selected by Iangwm
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants