Talking to the PC


I was just curious because my Visual Studio C# knowledge is very limited.

What is the best way of talking to the PC from the gadgeteer aside from using ethernet / WIFI.

It’s well documented in the arduino / processing world how to work with both with serial and it’s easy and hugely popular.

Previously I used the serial on gadgeteer and processing as I new how to do that but are there other better options?

i.e. Can you easily make programmes in visual studio for the same purpose.

Thank you.

Do you mean for debugging or you want your final solution to talk to a PC using serial communications? For debugging there are much more elegant solutions than with Arduino using built-in capabilities of Visual Studio. For communicating to any serial port (PC or otherwise), you can do this simply by using the SerialPort class and any of the COM ports. For a native Gadgeteer experience, check out the Serial-USB module

And the other part of your question, you can write a simple Windows application that talks to the serial port on the PC, and that then talks to the program on the Fez. I have one that reads temperatures from the device, and sends simple control signals back.

Thanks for your replies.

Not so much for debugging - but yeah I noticed debugging is amazing with the gadgeteer as is visual studio as a whole.

Is it always necessary to use the serial module or because it’s already communicating debug commands can you use the USB Client module to talk to a PC application? Or is that what you use the SerialPort class for?

Thanks Brett - perhaps I should have a look for examples - in fact - did you share this anywhere?

I’m a product designer and not a great coder but if building windows apps and talking with the gadgeteer is as easy as gadgeteer code itself then I’d like to share it with other people with limited coding knowledge.

There should be plenty of examples in Codeshare of what you need. Here is a “terminal/shell” I wrote that is easily incorporated into any program: