Skip to content

Instantly share code, notes, and snippets.

@krishnan793
Last active August 29, 2015 14:16
Show Gist options
  • Save krishnan793/9b81152ee51ee92f11b5 to your computer and use it in GitHub Desktop.
Save krishnan793/9b81152ee51ee92f11b5 to your computer and use it in GitHub Desktop.
Print ADC value
value=$(cat /sys/bus/iio/devices/iio:device0/in_voltage0_raw)
value=$(echo $value*0.0004394 | bc)
echo "$value V"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment