The sketch is ok, works fine with whitecat, so definitively i think i m encountering a trouble in the vvvv patch i m actually trying to write.
My problem is that the rs232 nodes receives data continuously, like a serial port would do, but i cant get the indication of the last byte, wich is sended being a return of carryage. The result is a confusion in the data readen being AN/ type ( Analog) and DG/ type ( Digital). There is mix between arrays, and i think this is due to the moment of the capture of the RS232 data flow.
is there any trick to get the return of carriage ? or to know that the received data is complete ( in C code i m waiting for a END OF LINE car.)
I have tried CDR(string) and byte(decimal) > as value = 13
but refreshment of values fall down completely.
The return of carriage is not recognized on last caracter of the string received !
So any idea to S+H correctly the input from RS232 will be really appreciated ;-)
hi motzi, thanks a lot. and thanks for basic mata link.
no my problem is not Tokenizer.
I have the rs232input not receiving correctly the two types of messages sended by arduino.
Analogic are received correctly, AN/ and Bytes with data
But digital signal is crashed at the incoming, i m never having in vvvv RS232 node the DG/ keyword.
Its very strange, has the script works perfectly with whitecat. there may be a kind of subtility ( mainloop ? baudrate needed to be set higher ? a peculiar way to flush or handle the RS232 port ?) i m not used to …
If Uncle Kalle and Uncle West are around , it would be great to have their advices !
looking at your patch you assume that incoming serial data is arriving as one integer packet. data+delimiter at the end.
due to arduino and vvvv not being in sync you might get partial packets or more packets at a time, so the delimiter might not be at the end.
tokenizer is the one for fixing that. you should be able to use your delimiter as separator.
i always use custom bytewise serial data between arduino and v4 and there hasn’t been the case of v4 receiving something else than the arduino sent.
for debugging, you might just want to record some frames of data into a textfile (and post it into the forum)
hi master woei, and hi mrBoni.
well i m quite puzzled, because in C code i m just waiting the ending caracter to analyze incoming data. its stored and then i m flushing the port
maybe i should use a queue (string node) waiting for it. and process analyze at this moment.
eh eh… puzzling with method ;-) what i need is to store the data correctly. and so i presume now that RS232 is not keeping data inside itself !
thanks for your advice mrboni! i m using usually at 50 fps core and 25 to 50 fps request data, at 9600 bauds for a clasic arduino set ( 13 IO 6 Ana).
some work so i would come again on this topic sunday.
i’d say the v4 rs232 node reads the port each frame and then flushes it, no matter whats inside.
try yourself by blocking v4 (e.g. open up the save dialog).
so you have to care about stitching the parts together and splitting it after the delimiter by yourself. and thats what tokenizer is supposed to do.