We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hi Guys, I have a string coming from a navigation PC, containing an easting and northing. The string being sent looks exactly like this:
E238620.31 N2829868.73 FP 238620.31<CR><LF>
Now the string works on another system ( a video overlay system), so I know its there, but I would like to work with it in Processing, and I can't for the life of me see it. I just keep getting "null"
Something tells be it could have something to do with the CR and LF I cant change the string at all that is what it is.
Ive been going down the route of >>>>> String inBuffer = myPort.readString();
Any help would greatly be appreciated.
Cheers
Nik
Answers
Post entire code
Do you get the the data via usb?
Check these:
https://forum.processing.org/two/discussion/16618/processing-with-arduino-void-serialevent#Item_1
https://forum.processing.org/two/discussion/22732/how-do-i-split-an-incoming-6-value-string-into-separate-variables/p1
Kf
Thanks Kf,
But I'm pretty up to speed with the data - When I get it..
I'm simply not receiving it, almost like processing doesn't recognize the format of the string, maybe its the parity, stopbits, even the baud rate maybe wrong.
I'm using a windows 7 machine at work, and notice they no longer to Hyperterminal.
Is there another program, whereby I can physically check weather the string is actually coming into my computer first?
You are reading a string... but if you are processing bytes then maybe string is not the right way to handle the data. You can see what bytes arrive in processing if you do this:
Also use
printArray(Serial.list());
to check what com port your device is using. Run the command before and after you access the port from your navigation PC. If the port is not open properly, I will expect to have some sort of error message.Kf
Thanks Kf, I think my comms port may be duff. I have data coming in on another port from another machine, and can get that no problem. I may try switching the ports.