How to program to read keyboard input from USB connected ARGON

argon
Tags: #<Tag:0x00007fe223097b28>

#1

My program is outputting to TERMINAL in Visual Studio Code, but ignores keyboard input. While the program outputs to the terminal fine, it does not react to nor print out any keyboard entry. Here is the code snippet that is not working as expected:

if (Serial.available() > 0 )
  {
    byte incoming = Serial.read();
    Serial.print("you typed: ");
    Serial.println(incoming, DEC);
    delay(2000);
    if (incoming == 't') //Tare the scale
      myScale.calculateZeroOffset();
    else if (incoming == 'c') //Calibrate
    {
      calibrateScale();
    }
  }

#2

I guess your TERMINAL is running particle serial monitor, right?
If so, the monitor part indicates that it’s only to view the output but doesn’t send data back.


#3

You need to use an external terminal emulator program - I use Cool Term as its inexpensive and works on multiple OS platforms


#4

ScruffR, Thank-you for the prompt, and spot on, diagnosis! Problem resolved.


#5

shanevanj, I appreciate your prompt guidance, including the recommendation of Cool Term. My issue with keyboard input to a running ARGON program is resolved and I can move forward. Thank-you!
Jim M