New version available!
I’m working in some 4D projects that we need to interact with arduino to control external hardware… So, I made this plugin to help in my projects based on the serial library by Teunis van Beelen (RS-232 for Linux and Windows)
Its serial communication works in Windows, OSX and Linux.
The code is available at: Bitbucket
Just clone the repo and copy the “ArduinoKit” folder inside “Plugins” to your own “Plugins” folder.
I hope that it can be useful for some people.
Here are the nodes available:
For the port name, you need to write the full path, for example:
Windows users only:
ports higher than “COM9” need to be on this format: “\.\COM10”, “\.\COM11”, “\.\COM12” and so on…
The Read Text Node pops the last string that was read from arduino. If nothing is found, it will return a blank string.
The Get All Available Texts Node will return the whole stack of strings that was read from arduino. The last one is the most recent. After you call this node, the stack is cleared.
All strings sent from arduino **must **have the ending character “/n” or use Serial.println () instead of Serial.print().
The Open Node now tries to close any previously opened connection.
The Open Node have a new input parameter that is the max size of the stack that will hold all strings read from arduino. If it is filled, it will discard the oldest one and push the new one on the top of the stack.