Skip to content

Extraction of actual voltage value from set_pin_mode_analog_input ? #71

Answered by MrYsLab
nildude asked this question in Q&A
Discussion options

You must be logged in to vote

@nildude
A couple of other things. If you are using an STM32 or ESP8266, the values measure from 0 to 3.3 v and not 0 to 5v as the Arduino AVR does. Also, the range of values returned for the STM32 is 0 to 4095. For the ESP8266, the range of values is 0 to 1023.

Lastly, the conversion to a voltage would be done in the callback method of your application for the analog input pin. You could modify the Arduino/STM32/ESP8266 to do the conversion, but doing things on the Python side keeps things very flexible.

Replies: 2 comments 1 reply

Comment options

You must be logged in to vote
0 replies
Comment options

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

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