From 2a409576369fe130e42f0e7d366014e2df012fa2 Mon Sep 17 00:00:00 2001 From: mattmcw Date: Mon, 13 Feb 2023 15:31:21 -0500 Subject: [PATCH] Works! (forgot essential piece of code). Softserial communication from another device will trigger commands --- ino/takeup/takeup.ino | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ino/takeup/takeup.ino b/ino/takeup/takeup.ino index 446425e..65bb38f 100644 --- a/ino/takeup/takeup.ino +++ b/ino/takeup/takeup.ino @@ -87,7 +87,7 @@ void setup() { void loop() { timer = millis(); - + if (Serial.available()) { cmdChar = (char)Serial.read(); } @@ -102,6 +102,10 @@ void loop() { cmdChar = (char)softSerial.read(); } + if (cmdChar != 'z') { + cmd(cmdChar); + } + cmdChar = 'z'; btn(Fmotor);