mcci-catena / Catena-Arduino-Platform

Arduino platform library for MCCI Catena IoT Systems
MIT License
12 stars 11 forks source link

Add methods for reading VCC on samd, stm32 #128

Open terrillmoore opened 5 years ago

terrillmoore commented 5 years ago

I need to be able to read VCC to deal with low-battery situations (the problem is really VCC, not Vbat).

svelmurugan92 commented 5 years ago

VCC is connected with Vref. Can we read Vref voltage? STM32L0_ADC_CHANNEL_VREFINT

terrillmoore commented 5 years ago

The problem is getting the same normalization pattern that we have with Vbat and Vbus. So we need another method (in the sense of a C++ method). Of course, we'll read VREFINT, and normalize to find VCC.