Last active
August 29, 2015 14:15
-
-
Save miettal/a27579cc316bc91edd4b 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
void setup() | |
{ | |
Serial.begin(9600); | |
pinMode(2, OUTPUT); | |
} | |
void loop() | |
{ | |
int aout = analogRead(0); | |
int dout = digitalRead(2); | |
Serial.print("AOUT:"); | |
Serial.print(aout/1023.0*5.0); | |
Serial.println("V"); | |
Serial.print("DOUT:"); | |
Serial.println(dout==HIGH?"HIGH":"LOW"); | |
Serial.println(); | |
delay(1000); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment