BresserWeatherSensorLW
Bresser 868 MHz Weather Sensor Radio Receiver based on ESP32/RP2040 and SX1262/SX1276/LR1121 - sends data to a LoRaWAN Network
Loading...
Searching...
No Matches
adc.h File Reference

ADC wrapper/convenience functions. More...

#include <Arduino.h>
#include "../../BresserWeatherSensorLWCfg.h"
Include dependency graph for adc.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

uint16_t getVoltage (uint8_t pin=PIN_ADC_IN, uint8_t samples=UBATT_SAMPLES, float divider=UBATT_DIV)
 Get supply / battery voltage.
uint16_t getBatteryVoltage (void)
 Get battery voltage.
uint16_t getSupplyVoltage (void)
 Get supply voltage.

Detailed Description

ADC wrapper/convenience functions.

Function Documentation

◆ getBatteryVoltage()

uint16_t getBatteryVoltage ( void )

Get battery voltage.

Returns the battery voltage or zero if not available (board specific)

Returns
Voltage in mV or zero if not available

◆ getSupplyVoltage()

uint16_t getSupplyVoltage ( void )

Get supply voltage.

Returns the battery voltage or zero if not available (board specific)

Returns
Voltage in mV or zero if not available

◆ getVoltage()

uint16_t getVoltage ( uint8_t pin = PIN_ADC_IN,
uint8_t samples = UBATT_SAMPLES,
float divider = UBATT_DIV )

Get supply / battery voltage.

Returns a voltage measurement with oversampling and divider

Returns
Voltage in mV