×

SparkFun will be closing early at 3:30 Friday 5/27 and remain closed Monday for Memorial Day (5/30). Orders placed after 2pm MT on Friday (5/27) will process and ship out on Tuesday (5/31).

Chuk

Member Since: December 16, 2010

Country: United States

  • In a typical micro-controller ADC setup, I found this formula to give fairly good percentage readings (0..100), you could tweak the 0.36 value if needed.

    100 * ((ADC_read / ADC_max) ^ 0.36)
    

    or for PIC32

    100.0f * powf(ADC_read/1023.0f, 0.36f);
    

No public wish lists :(