Go Down

Topic: C and C++ serial connection (Read 1 time) previous topic - next topic

Sep 23, 2013, 11:41 am Last Edit: Sep 23, 2013, 12:10 pm by rfringuello89 Reason: 1
Hi, I'm trying to link my Arduino uno R3 to a c or c++ application by a serial connection on Linux Slackware. I can't find a functional example online.
Can anyone tell me where to find one example for c and one for c++?
I'm able to use python but i prefer c/c++ languages.



I can't find a functional example online.

You didn't look hard enough, then.

http://playground.arduino.cc//Main/InterfacingWithSoftware has sections for Arduino + C, C++, etc. once you get past all the spam.

If one of those links doesn't do what you want, detail which one and the problems you have. Then, we can do something about the link.

Well, I forget to say "without external libraries"!! But now I assume using libraries it's the best way and I'm going to try those examples!

Thank you!


Well, I forget to say "without external libraries"!!

That's a different story. Native support for com ports is not a feature of C or C++.

Ok now I understand why I couldn't find anything LOL :D


you can try to open the file with the device name e.g. "/dev/tty" . small chance but worth the try... (all disclaimers apply)
Rob Tillaart

Nederlandse sectie - http://arduino.cc/forum/index.php/board,77.0.html -
(Please do not PM for private consultancy)

I tried this morning with "cat /dev/ttyACM0" and it works.. But i wanted something more "professional"! Right now I'm experiencing problems trying to compile libserial on my Slackware64...

Go Up