From 2e100285b94edc8f02857118a2771915242ee585 Mon Sep 17 00:00:00 2001 From: alanbjohnston Date: Thu, 5 Mar 2020 16:52:28 -0500 Subject: [PATCH] Create PayloadOK.ino --- arduino/PayloadOK.ino | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 arduino/PayloadOK.ino diff --git a/arduino/PayloadOK.ino b/arduino/PayloadOK.ino new file mode 100644 index 00000000..21397704 --- /dev/null +++ b/arduino/PayloadOK.ino @@ -0,0 +1,25 @@ + int counter = 0; + + void setup() { + Serial1.begin(9600); + pinMode(PC13, OUTPUT); + digitalWrite(PC13, LOW); // turn the LED on + delay(50); // wait for a second + digitalWrite(PC13, HIGH); // turn the LED off + +} + +void loop() { + + if (Serial1.available() > 0) { + digitalWrite(PC13, LOW); // turn the LED on + delay(50); // wait for a second + digitalWrite(PC13, HIGH); // turn the LED off + char result = Serial1.read(); +// Serial1.println(result); + Serial1.println("OK"); +// Serial1.println(counter++); + } + + delay(100); +}