fthiebolt / LoRa-boards-stm32duino

stm32duino support for LoRa boards like Heltec LoRa Node L151 and BSFrance stm32l151c8t6
8 stars 0 forks source link

ADC AnalogRead() not working with Heltec LoRa Node L151 (L151CCU6) #3

Open gbraux opened 3 years ago

gbraux commented 3 years ago

Hi,

Scratching my head since a few hours ... Has anybody tried to do some analogRead() with the L151CCU6 variant (LoRa Node L151) ? Getting zero, zero and always zero ;-) And I confirm I have 3.3 voltage on the ADC pins ...

Code spinet as easy as :

uint32_t batteryVoltage= analogRead(PB_3);

Thx, Guillaume.

fthiebolt commented 3 years ago

Bonjour Guillaume,

I think you should have a look to the variant files themselves to check ADC has been enabled. On our side, we switched to CubeCell versions so i won't have a chance to test on this board.

Good luck!

fthiebolt commented 3 years ago

additionally, this board has now support in the Heltec CubeCell serie :)