Skip to content

Instantly share code, notes, and snippets.

@e-Gizmo
Created May 17, 2019 02:40
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save e-Gizmo/1c0a59fde80b4056c53ebc31d1e45381 to your computer and use it in GitHub Desktop.
Save e-Gizmo/1c0a59fde80b4056c53ebc31d1e45381 to your computer and use it in GitHub Desktop.
This is an example code for Line sensor-Single Digital Output.
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