Skip to content

Instantly share code, notes, and snippets.

@li2hub
Created September 28, 2018 04:50
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 li2hub/2ff0bc496232a8558f1564a63d6953eb to your computer and use it in GitHub Desktop.
Save li2hub/2ff0bc496232a8558f1564a63d6953eb to your computer and use it in GitHub Desktop.
void setup() {
Serial.begin(115200);
}
void loop() {
if(digitalRead(D6)==LOW){
Serial.println("Obstacle");
}
else{
Serial.println("Clear");
}
delay(100);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment