[chronojump] Force Sensor. Added support to nano every
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] Force Sensor. Added support to nano every
- Date: Mon, 3 Aug 2020 14:28:54 +0000 (UTC)
commit 0f6fea2bba996d4a75c1f11a5a3f8bf8d7579dea
Author: Xavier Padullés <x padulles gmail com>
Date: Mon Aug 3 16:27:04 2020 +0200
Force Sensor. Added support to nano every
arduino/ForceSensor/ForceSensor.ino | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/arduino/ForceSensor/ForceSensor.ino b/arduino/ForceSensor/ForceSensor.ino
index c1785462..4afa163b 100644
--- a/arduino/ForceSensor/ForceSensor.ino
+++ b/arduino/ForceSensor/ForceSensor.ino
@@ -101,9 +101,13 @@ void loop() {
Serial.print(";");
Serial.println(scale.get_units(), 2); //scale.get_units() returns a float
}
+
+ //Checking if there's incoming serial data
+ if (Serial.available()) { processSerial();}
}
-void serialEvent()
+//In old version SerialEvent() was used but the nano every don't support it
+void processSerial()
{
String inputString = Serial.readString();
String commandString = inputString.substring(0, inputString.lastIndexOf(":"));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]