Is there a library/method for communicating with a microcontroller (Arduino)?
Basically, I need a method of receiving and sending data between the PC and the Arduino. I don't know what library to use, so I'm asking you. The data I'm going to send is little. Maybe 500 bytes back and forth. Everything is happening in Visual C++ 2010, in a console application.
libusb is a library that provides applications with access for controlling data transfer to and from USB devices on Unix and non-Unix systems, without the need for kernel-mode drivers.
Click Driver label and click 'Update Driver'. Choose “Browse my computer for driver software”. Choose “Let me pick from a list of device drivers on my computer”. Click “Have Disk” and locate to your driver files directory.
libusb: A free library for accessing USB devices written in C. libusb is a free and open-source library for interacting with USB devices written in C. It is available for download on Github.
You will need to include the libusb header file in your source project. Then under your project settings you should go to the Linker section and add the LIB file as a linked object. Then, just ensure your DLL is accessible to your executable when running or debugging.
libusb seems to be one of the best choices in your case. This is a lightweight, widely-used, open-source, cross-platform and well-documented C library.
termios
also works fine. I've been using it to connect an Arduino to a Raspberry Pi (Linux) via serial link (USB). You could find some useful code snippets here.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With