Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

I'm trying to see the character string in Hyperterminal

0 votes

Hello everyone.

I am trying to simplify the example to be able to see the string of characters sent to me by the camera, first for T2 and then for N2.

The program modified:

 #include <Servo.h>
  
 #define SERIAL Serial
 #define INLEN 128

 char instr[INLEN + 1];

  void setup()
 {
   Serial.begin(115200);
   Serial.setTimeout(1000000);
   Serial.println("setpar serlog None");
   Serial.println("setpar serout Hard");
   }
 
  void loop()
  {
   byte len = Serial.readBytesUntil('\n', instr, INLEN);

   instr[len] = 0;
   Serial.println(instr);
   delay(50);

    }

When I compile and load the program in the arduino UNO, the result in the Hyperterminal is the following:

setpar serlog None
setpar serout Hard
T2 61 -123

T2 61 -122

ERR Unsupported command [T2 61 -123]

T2 61 -122

ERR UnsupportT2 63 -122

ERR Unsupported command [ET2 63 -122

T2 63 -122

ERR UnsupportT2 63 -122

ERR Unsupported command [ET2 63 -122

T2 61 -122

ERR UnsupportT2 59 -122

ERR Unsupported command [ET2 58 -122

T2 58 -122

ERR UnsupportT2 59 -122

ERR Unsupported command [ET2 59 -122

T2 59 -122

ERR UnsupportT2 58 -122

ERR Unsupported command [ET2 58 -122

T2 58 -122

ERR UnsupportT2 58 -122

ERR Unsupported command [ET2 58 -122

T2 58 -122

ERR UnsupportT2 58 -122

ERR Unsupported command [ET2 59 -122

T2 58 -122

ERR UnsupportT2 59 -122

ERR Unsupported command [ET2 58 -122

T2 59 -122

ERR UnsupportT2 59 -122

ERR Unsupported command [ET2 59 -122

T2 59 -122

ERR UnsupportT2 59 -122

ERR Unsupported command [ET2 59 -122

T2 59 -122

ERR UnsupportT2 59 -122

ERR Unsupported command [ET2 61 -122

T2 59 -123

ERR UnsupportT2 59 -122

ERR Unsupported command [ET2 59 -123

T2 59 -123

ERR UnsupportT2 61 -123

ERR Unsupported command [ET2 61 -123

T2 61 -123

ERR UnsupportT2 61 -123

T2 61 -123

ERR UnsupporteT2 61 -123

T2 58 -123

T2 59 -123

ET2 56 -123

T2 52 -123

T2 48 -123

ERT2 50 -123

T2 48 -123

My question is this: Why is "ERR Unsupported command"?

Now I have included the line: "setpar serstyle Normal" in the file: initscript.cfg

setmapping2 YUYV 320 240 30.0 JeVois DemoArUco
setpar serout Hard
setpar serstyle Normal
streamon

And the result of running the program is as follows:

setpar serlog None
setpar serout Hard
2 -300 69 1075 925

N2 U2 -300 69 1075 925

OK

N2 U2 -300 69 1075 925

OK

N2 U2 -300 69 1075 925

ERR UnsuppoN2 U2 -300 69 1075 925

rtedN2 U2 -300 69 1075 925

N2 U2 -300 69 1075 925

ERR UnsuppoN2 U2 -300 69 1075 925

ERR N2 U2 -300 69 1075 925

N2 U2 -300 69 1075 925

ERR UnsuppoN2 U2 -300 69 1075 925

ERR N2 U2 -300 69 1075 925

N2 U2 -300 69 1075 925

ERR UnsuppoN2 U2 -300 69 1075 925

ERR N2 U2 -300 69 1075 925

N2 U2 -300 69 1075 925

ERR UnsuppoN2 U2 -300 69 1075 925

ERR N2 U2 -300 69 1075 925

N2 U2 -300 69 1075 925

ERR UnsuppoN2 U2 -300 69 1075 925

ERR N2 U2 -300 69 1075 925

N2 U2 -300 69 1075 925

ERR UnsuppoN2 U2 -300 69 1075 925

ERR N2 U2 -300 69 1075 925

N2 U2 -300 69 1075 925

ERR UnsuppoN2 U2 -300 69 1075 925

ERR N2 U2 -300 69 1075 925

N2 U2 -300 69 1075 925

ERR UnsuppoN2 U2 -300 69 1075 925

ERR N2 U2 -300 69 1075 925

N2 U2 -297 75 1081 938

ERR UnsuppoN2 U2 -297 78 1081 931

ERR N2 U2 -294 81 1088 938

N2 U2 -294 81 1088 938

ERR UnsuppoN2 U2 -294 84 1088 944

ERR N2 U2 -294 84 1088 944

N2 U2 -291 84 1081 944

ERR UnsuppoN2 U2 -291 84 1081 944

N2 UN2 U2 -291 84 1081 944

N2 U2 -291 84 1094 944

N2 U2 -294 N2 U2 -294 84 1088 944

ERR N2 U2 -291 84 1094 944

What should I do to correct this error?​

Thank you!.

asked May 11, 2018 in Programmer Questions by cbodington (710 points)

1 Answer

0 votes
 
Best answer

Oh, when your arduino runs

 Serial.println(instr);

It is sending instr to the command line interface of jevois. Jevois tries to understand the contents of the string as a command. But T2 is not a valid command, hence the error.

Usually, you would use another port on the arduino to communicate debugging messages to you, not the same as it uses to communicate with jevois. Since you only have 1 hardware serial on the Uno, you can try this: add a # in front of your string. When jevois receives it, it will ignore it as being a comment. So

Serial.print(“# “);

Serial.println(instr);

answered May 12, 2018 by JeVois (46,580 points)
selected May 13, 2018 by cbodington
Thank you Sr.! I will try this solution today.
...