[chronojump] ForceSensor. Fixed offset after uploading firmware
- From: Xavier Padullés <xpadulles src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [chronojump] ForceSensor. Fixed offset after uploading firmware
- Date: Tue, 26 Nov 2019 17:30:13 +0000 (UTC)
commit 15f590e009d4f2eea0f0697ed4a17b42a4f2d62a
Author: Xavier Padullés <x padulles gmail com>
Date: Fri Nov 15 12:50:57 2019 +0100
ForceSensor. Fixed offset after uploading firmware
arduino/ForceSensor/ForceSensor.ino | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/arduino/ForceSensor/ForceSensor.ino b/arduino/ForceSensor/ForceSensor.ino
index d3e268ad..c1785462 100644
--- a/arduino/ForceSensor/ForceSensor.ino
+++ b/arduino/ForceSensor/ForceSensor.ino
@@ -22,7 +22,7 @@
*/
-#include "HX711.h"
+#include <HX711.h>
#include <EEPROM.h>
#define DOUT 3
@@ -62,8 +62,8 @@ void setup() {
long tare = 0;
EEPROM.get(tareAddress, tare);
- if (isnan(tare)) {
- scale.set_scale(10000);// Usual value in Chronojump strength gauge
+ if (tare == -151) {
+ scale.set_offset(10000);// Usual value in Chronojump strength gauge
EEPROM.put(tareAddress, 10000);
} else {
scale.set_offset(tare);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]