Sending Data over USB

Hi,

Does anyone know a way to send text to a USB port? Perhaps using a plug-in?

I’d like to use Grasshopper to send data to a robot. It accepts simple ASCII text commands to control it. An example command is “Move L 0,0,0,1,0,0”. I can easily generate the text strings, I just need a way to send them out.

Thanks!
Mark

The capability of doing this kind of thing, and much more, with Grasshopper (C#) has always worried me.

I’ve used a USB to serial (rs232) adaptor and some simple python code to send text data from rhino to a vinyl cutter/plotter.

The code would be adaptable to this application if your robot has serial comms (very likely).

I’ll post the code when I get to my PC later this morning.

Cheers

DK

201121_Serial control of DGI plotter.py (4.1 KB)

There you go

Cheers

DK

Hi David,

Thanks! Code is nice and simple. I’ll give it a try.

Thanks again,
Mark