Created
May 17, 2019 02:40
-
-
Save e-Gizmo/1c0a59fde80b4056c53ebc31d1e45381 to your computer and use it in GitHub Desktop.
This is an example code for Line sensor-Single Digital Output.
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(8, INPUT_PULLUP); | |
} | |
void loop() { | |
int Val = digitalRead(8); | |
if (Val == HIGH) { | |
Serial.println(Val); | |
delay(1000); | |
} | |
else { | |
Serial.println(Val); | |
delay(1000); | |
} | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment