Serial port Tokenizer

Hi guys
I would like to use Gamma to build a small application to plot data comming from a “kind of arduino” board
Arduino IDE have a Serial Plotter tool, I would like to re create the same tool and make it better in Gamma

On this image is how I can do it in VVVV beta, but I´m not sure what is the equivalent for Gamma

i needed this recently. thats what i came up with.I use Tokenizer (postfix)
you can create the objectify delegate by starting the link and then middle click somewhere

image

Hello @tgd thanks for your quick reply
I’m quite new into Gamma, not sure what the D object means and how it was created
and also I don’t have the node ToBytes
can you point me to any reference to understand your patch / upload it ?
thanks!

  1. The delegate region (D object) is created from the pin. start a link from its pin, then middleclick.
    Honestly i am not sure what it is for or how to use it with the tokenizer but it has to be there, otherwise the node wont run.
  2. See the funny circles in the upper left of the node browser. click the bottom one. Then you can find ToBytes (String)

please have a look at the HowTo Tokenizer-ReceiveStreamOfData which you can find via the helpbrowser and let us know if this needs further clarification.

The example its super clear!, I will keep using the node help menu, I was so used to select a node and press F1 that I did not look into the help menu
Now I need to convert “a” String to byte to feed the tokenizer node
image

I was looking into the help, but still no luck
image

I was using this reference

@andresc4, A MutableArray is a type of Sequence, so it can be used:

callmenames-2020-05-17-Application_2020.05.17-09.56.29

1 Like

@joreg I totally missed the howto. but now looking at it i wonder about the below chain. What is Oftype and FromSequence doing? It seems not much. Why are they used there?

image

@Hadasi that was my first idea, to look for a ToBytes node, but the only node with that name is ToBytes(Color) …
but looking at the HelpBrowser I see the example file and the node is preset
If I am on a clean document, how can I get the ToBytes node? Importing the advance package ?

@andresc4
grafik

indeed the help-patch was not yet associated. but if you clicked the bubble as it says, you’d have found that howto patch anyway, listed among “Also found in other patches”…

and the ToBytes [String] is an advanced node:
grafik
to acccess those you need to activate the “Advanced” aspect in the nodebrowser.

@tgd

indeed this was only a workaround for a former bug of the tokenizer. i fixed that in the patch. OfType and FromSequence can be removed. the GetSlice is there to choose one of the possibly many tokens that can be received per frame.

Ok I got my data, the string node to split are quite similar, so I got it working
Basically the app that I need should let me chose the COM port , and visualize the data
And I got stuck again …

I would like to use a ord2enum / enum2ord nodes to select the com port, but the 2 nodes use a “object” Input node type
I did not found any help pressing F1, or into the HelpBrowser or the the-gray-book… any help patch that use those nodes ?

There is a Create(ComPort) node that takes a string as input. Maybe this works, can not check atm

@tgd Yes, this works, I can make a list using commandline “mode” command I can list all the not used com ports , nice!

regarding the Ord2Enum not working with the ComPort enum: there are two types of enums in VL:

  • normal ones
  • dynamic ones
    and i’m afraid you cannot know which is which.

the Ord2Enum only works with the normal ones. for the dynamic ones there is an equivalent node called TrySelectIndex [DynamicEnum] available under the advanced aspect.

you can also get a list of all available entries like so:

grafik

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.