Skip to content

Instantly share code, notes, and snippets.

@surinoel
Created July 13, 2019 04:23
Show Gist options
  • Save surinoel/95b3638eab4f57ca3f3d044f87cd4aa6 to your computer and use it in GitHub Desktop.
Save surinoel/95b3638eab4f57ca3f3d044f87cd4aa6 to your computer and use it in GitHub Desktop.
int recv = 13;
int trans = 3;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
pinMode(recv, INPUT);
pinMode(trans, OUTPUT);
digitalWrite(trans, HIGH);
}
void loop() {
// put your main code here, to run repeatedly:
if(!digitalRead(recv)) {
Serial.println("Read");
delay(100);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment