简体   繁体   中英

Communication from C++ to Arduino Programming language on OS X

I have been scouring the internet for some time now trying to figure out how to send data from C++ (which will read an input .txt file) to an Arduino. Because there does not seem to be a native way in Arduino to read files directly, I chose to use C++ to read the file and then send it over to the Arduino. The primary method of doing this seems to be communicating via Serial. So my question is this:

How do you communicate to Serial in C++ (using an OS X device) and subsequently read it in Arduino? Further, are there other, simpler methods of transferring data to Arduino via C++ or natively in Arduino?

Take a look at boost asio or Qt Serial Port . Both are portable versions for serial-communication with C++.

There is no other option, which could be simpler than serial communication.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM