Created
May 17, 2012 12:46
-
-
Save omundy/2718676 to your computer and use it in GitHub Desktop.
BeagleBone test and print all analog-in pins
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# analog-test-all-pins.py - Owen Mundy | |
# Print reading from each analog-in pin on a BeagleBone | |
# with a short delay between each | |
# This example is in the public domain | |
import os,time | |
i = 1 | |
while(True): | |
os.system("cat /sys/bus/platform/devices/tsc/ain" + str(i)) | |
print " - AIN" + str(i-1) | |
if i==7: | |
i=1 | |
time.sleep(.5) | |
print "------" | |
else: | |
i+=1 | |
time.sleep(.1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment