PC Comunication

Hello,

I have one Arduino 2560. Can I receive and send information, for example set ou reset the outputs, with Visual Studio, and USB Interface ?

Short answer, yes.

Longer answer, you'll have to develope a simple protocol with VS code on the PC and C/C++ code on the Arduino that allows the two to talk to each other.


Rob

Thanks.

And can you told me, how to make this connection, and program?

You didn't say what VS language so I'll assume VB

If Not SerialPort1.IsOpen() Then
    SerialPort1.Open()
End If

 SerialPort1.Write(5)

Arduino

if (Serial.available () > 0) {
   pin = Serial.read();
   digitalWrite (pin, HIGH);
}

That's the basic idea, but there's a lot of extra "stuff" required to make it reliable.


Rob

It is possible with usb port of arduino ?

The Arduino is seen as a COM port to the PC when plugged in to USB.

Thanks fo reply.

I' think about usb was only to programing/debug.

Thanks for all reply's.

Tiago Pais