version of PayloadOK for Arduio Pro Micro 3.3V Board

pull/52/head
alanbjohnston 5 years ago committed by GitHub
parent 7978dd0b2e
commit 6f1ef61b47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -0,0 +1,30 @@
int counter = 0;
int RXLED = 17; // The RX LED has a defined Arduino pin
void setup() {
Serial1.begin(9600);
digitalWrite(RXLED, LOW); // set the RX LED ON
TXLED0; //TX LED is not tied to a normally controlled pin so a macro is needed, turn LED OFF
delay(50); // wait for a second
digitalWrite(RXLED, HIGH); // set the RX LED ON
TXLED0; //TX LED is not tied to a normally controlled pin so a macro is needed, turn LED OFF
}
void loop() {
if (Serial.available() > 0) {
digitalWrite(RXLED, LOW); // set the RX LED ON
TXLED0; //TX LED is not tied to a normally controlled pin so a macro is needed, turn LED OFF
delay(50); // wait for a second
digitalWrite(RXLED, HIGH); // set the RX LED ON
TXLED0; //TX LED is not tied to a normally controlled pin so a macro is needed, turn LED OFF
char result = Serial1.read();
// Serial1.println(result);
Serial1.println("OK");
// Serial1.println(counter++);
}
delay(100);
}
Loading…
Cancel
Save

Powered by TurnKey Linux.