Last active
April 16, 2016 04:39
-
-
Save madhephaestus/5c7e906f80cee9872a56 to your computer and use it in GitHub Desktop.
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
// Set up the analog channel | |
AnalogInputChannel ana = new AnalogInputChannel(dyio.getChannel(12)); | |
//disable the async so we can read just this channel | |
ana.setAsync(false); | |
//Loop forever printing out the voltage on the pin | |
while(!Thread.interrupted()){ | |
System.out.println(ana.getVoltage()); | |
Thread.sleep(100); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment