PDA

View Full Version : Arbotix Pro & Intel NUCi57RYH HELP



gregorio_626
02-29-2016, 11:57 AM
So here is the story...<br>I am working on a hexapod(as most of you might know). I recently received my Intel NUC. I already have it up and running on Linux Ubuntu LTS(The most current version). I am waiting on my Arbotix Pro to arrive in the mail, and I wanted to get a head-start on learning how to use it with my intel NUC to control my motors. does anyone know of any really really(LIKE REALLY) good examples and/or tutorials on how to do this? Also, what serial libraries will I need to become most familiar with? I am also new to linux as a whole. I only have a bit of experience with it, from raspberry pi.<br><br>Any links, tutorials, or basic info will be useful. I DO NOT want to use Arduino IDE for any of it. And I program in C++. Finally, all of the motors are AX-18A Dynamixel motors.

jwatte
02-29-2016, 06:08 PM
To talk to a Linux serial port, there is a little bit of jiggery-pokery needed.

The port is typically called /dev/ttyACM0, or /dev/ttyCDC0, or /dev/ttyUSB0.
You open it with open().
Then you put it into "raw" mode with some amount of timeout, which requires tcgetattr(), cfmakeraw(), and tcsetattr().
Then you can just read() and write() it.
Note that with the right configuration, you can make read() polling -- if there is no data, return 0, rather than wait for data.

The man page for open(), read(), write(), and tcgetattr(), should get you going.

gregorio_626
03-11-2016, 03:03 PM
So to sum things up, would you suggest I first learn about termios.h?
Some of the stuff I see you talking about, I am starting to notice in termios.h, since I am just starting to become familiar with it.

KurtEck
03-11-2016, 07:23 PM
I think that was covered more in the other thread. Yes termios is needed to configure things. I believe I gave you links to some simple implementations (XBee or to talk to Lynxmotion SSC-32 or Robo-claw)...

As I mentioned, I started off trying to understand how to talk to one of these devices in simple test app. I then ported the Arduino Bioloid library over, to make it easy for me to convert my Arduino code to Linux... (Again up in my Raspberry Pi project under BioloidEx).

Not sure if that helps. Or if you have any questions.