sparkfun/OpenScale

Serious issue with menu interface over Serial Monitor

chasegrif opened this issue · 1 comments

When using the serial monitor in Arduino IDE and trying to access the menu, the line ending drop-down menu in the serial monitor window (newline, carriage return, or both, next to the baud rate drop-down menu) adversely affects the behavior of the program.

When using "newline", commands/inputs are ignored, such as sending 'x' to access the menu.

When using "carriage return" sometimes the user input is recognized, but the serial monitor stops outputting (basically the program hangs indefinitely)

When using both "NL & CR" the program interprets this as a "double input" as if the enter key was pressed twice, so when accessing a menu option, the second menu receives a blank/null input and returns to the main menu, basically printing the menu twice.

This behavior depends on the option being selected, such as changing the units (which works like boolean logic) versus a menu option that waits for user input (such as the calibration function)

However, I was successfully able to interface with OpenScale menu via PuTTY, which worked flawlessly.

The problem is that I am trying to use this platform for a course I am teaching and want my students to be able to do this on their personal computers and I would like for them to be able to do everything from the Arduino IDE rather than having them download a separate program.

Also, when running this program on an Arduino Uno, does anyone know off-hand which of the digital input pins is assigned for the remote sensor? Is it 4? Where is it defined? I could find this with some digging but just wanted to ask if anyone knew already. Will a digital thermocouple work in place of the "remote sensor" in the program? So long as I have it connected to that pin?

Thank you so much for your time, I genuinely appreciate how much work went into this project, it is leaps & bounds beyond the typical HX711 sketches I've used during the past in terms of features and user interface, which I would love to be able to share with my students, I'm just having frustrations with the interface not responding correctly.

Please ask me any questions regarding my issue, I will troubleshoot/test/check anything you think is worth investigating, thanks again.

Wow. I wrote this sketch 7 years ago.

I recommend Tera Terminal over using the Arduino IDE's serial monitor.

Sorry, I don't have whitespace filtering on the input. Whatever character arrives gets tested, include /n and /r. If you'd like to improve it I welcome a PR.

OneWire sensor is defined here.