From 6f1ef61b47b130aa572cbb97f3b45f5b6a1d6758 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Fri, 31 Jul 2020 16:28:16 -0400 Subject: [PATCH] version of PayloadOK for Arduio Pro Micro 3.3V Board --- arduino/PayloadOK_Pro_Micro.ino | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 arduino/PayloadOK_Pro_Micro.ino diff --git a/arduino/PayloadOK_Pro_Micro.ino b/arduino/PayloadOK_Pro_Micro.ino new file mode 100644 index 00000000..9af67fdf --- /dev/null +++ b/arduino/PayloadOK_Pro_Micro.ino @@ -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); +}