Go Down

Topic: Windows Application communication with Arduino Due using USB (Read 227 times) previous topic - next topic

evilakki

I have come across Arduino HID and HOST libraries. So, the Arduino Due can send data to the PC application when it acts as a USB keyboard. Whereas, if the Arduino Due is programmed to be a USB host, it can receive key inputs from a USB keyboard connected on its native port, but in this case it cannot be connected to a PC and receive data from the Windows application through USB.

I do not want to use serial communication where a COM port needs to be connected to the application, to send data from the application to Arduino.

Is it possible to send data to Arduino from PC over USB?

Thank you.

Robin2

I do not want to use serial communication where a COM port needs to be connected to the application, to send data from the application to Arduino.
What advantage do you envisage if you don't use a COM port?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

horace

is it possible to send data to Arduino from PC over USB?
so long as you don't require large volumes of data / second you could implement the Due as a USB device using the HID protocol (max approx 40Kbytes/second)
I had done this with PIC24 and PIC32 microcontrollers so I would assume it is possible with the Due
software on the PC could then be implemented (using C++, VB, C#, Java, Python, etc) to connect to the USB device VID and PID

Robin2

so long as you don't require large volumes of data / second you could implement the Due as a USB device using the HID protocol (max approx 40Kbytes/second)
Wouldn't serial be faster than that?

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

evilakki

As a USB device using the HID library, I do not think the Arduino Due can receive data from PC, it can only send.
I want to eliminate the procedure for opening and closing of COM port and setting of baud rate. There is an issue with using COM port, as the connection between the PC and Arduino Due needs to be done again, if the board resets.

Thank you

Robin2

Maybe this Thread would be more productive in the DUE section of the Forum?

If you click Report to Moderator you can ask to have it moved.

...R
Two or three hours spent thinking and reading documentation solves most programming problems.

horace

As a USB device using the HID library, I do not think the Arduino Due can receive data from PC, it can only send.
USB HID is bi-directional and the Microchip USB Library supports this (don't know about the Arduino library).
I have an number of devices using PIC microcontrollers which sample data from sensors and report results to host systems using the HID protocol.  In addition the host systems can communicate with the microcontroller to configure parameters and/or request status updates.  Using HID saves one the task of custom driver development (and end users having to instal the custom drivers).
Host code can be written in languages which have USB HID support, e.g. C#, VB.NET, C++, Java, Python, etc.
I have a couple of Due boards somewhere - will have to try the Arduino library.

evilakki

Thank you for your response.

I had come across some applications of USB HID with ARM controllers earlier. But, I am trying to find a way using Arduino on which I am working currently. Please, respond if you get some result with Arduino Due.

Go Up