0

I'm trying to create a GUI (User station kind) and use functions defined in the arductoper arduino library like the AP_Motors and the sensor data. Right now, the GUI is stand-alone and compiles with GTK as an included library:

g++ gui.cpp -o ucs `pkg-config --cflags --libs gtk+-3.0`

The arduino sketch is also standalone and has its own loop() function.

The question is, how do I include the arduino code & functions into my GUI code and compile it successfully? I've tried several things but it hasn't compiled.

Thanks!

1 Answer 1

1

I don't really understand.

The two programs will be on differnt machines right? So your GUI program will run on a desktop, and send serial data to Arduino. The arduino must understand the serail commands and send back data.

There are serval ways to use serail port in c++, none of them are easy.

The ardiuno code and the GTK code cannot be compiled together (they run on differnt machines).

2
  • I'm sorry, Looks like I got confused while writing this question. Is there a specific library I need to use for interacting with serial ports in c++?
    – W01
    Jun 5, 2013 at 19:09
  • 1
    boost.org/doc/libs/1_51_0/doc/html/boost_asio.html the boost lib are pretty good, but I have not used this one. teuniz.net/RS-232 (this is some random serail library) you could re-ask stackoverflow with the serial tag,
    – John b
    Jun 5, 2013 at 19:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.