c++ – finding inverse of int value using arduino uno r3 – Stack Overflow

I am trying to map the value of an analogRead from a potentiometer between 0-1. So what I do is. float inverse_value = 1.0f / (float)analogRead( pot_pin ). But when the analogRead of the potentiometer is at 0, the inverse is 0 (which is correct)
Recent Questions – Stack Overflow


Posted

in

by

Comments

Leave a Reply