Quantcast
Channel: Raspberry Pi Forums
Viewing all articles
Browse latest Browse all 8013

General • Re: Weird behaviour reading Vsys voltage

$
0
0
const float conversion_factor = 3.3f / (1 << 12);[/code]
I don't believe that's correct because it's dividing 'max' by 'steps', effectively 'N / (N+1)', which never exactly converts back to what it was.
Perhaps. I first had the formula as using 4095 (upper limit), as you say, but starting with zero, I came to the conclusion there are 4096 divisions 0-4096, not 1-4095. Only way to know is run it and test it, I guess.

Statistics: Posted by breaker — Thu Jan 30, 2025 4:11 am



Viewing all articles
Browse latest Browse all 8013

Trending Articles