Remote arm over bluetooth
Page 1 of 1

Author:  bryc0n [ Wed Jun 13, 2012 10:59 pm ]
Post subject:  Remote arm over bluetooth

I want to make a remote control arm that works over bluetooth, but I'm not sure how to go about doing so. I'll start off by describing how I want it to work, and you can point me in the right direction from there. The host hand (the one I physically manipulate) will send a bluetooth signal to the slave hand and the movements of one will match the other. This means that the host is idling/coasting and I physically move the motors. The amount those motors move will be equal to the amount the motors move on the slave/controlled arm. motors needed would be an elbow, rotation of the wrist, and opening/closing hand. Any help would be appreciated, thanks!

Author:  ferret_guy [ Fri Jun 22, 2012 2:46 pm ]
Post subject:  Re: Remote arm over bluetooth

Here is a topic on a robot car witch is similar and might help

Author:  JohnWatson [ Fri Jun 22, 2012 3:12 pm ]
Post subject:  Re: Remote arm over bluetooth

Bluetooth is a powerful, flexible tool once you get it to work right; it's the 'getting it to work right' that can be fun sometimes :D

I'm going to link a couple of resources that I've found useful so far in using Bluetooth on the NXT's, they should definitely help get you started.
First, a couple of wiki pages to get you up and running. The first one with the actual Bluetooth setup, the second one is a list of all the Bluetooth functions in RobotC:

Next, a very awesome tutorial from NXT community member Laurens from his Robot Square blog: ... bluetooth/

Finally, a rough breakdown of what you'd be looking at code-wise, possibly (there are usually multiple ways to do things, and I encourage forging your own path; you learn more from it that way, and it makes you a better, wiser engineer):

1) Read value from first, 'master' robotic arm's motor (nMotorEncoder)
2) Save value in a variable (int)
3) Send value to 'slave' robot (SendMessage)
4) Receive message on 'slave' robot (message)
5) Rotate 'slave' robot's motor until it reaches the desired value (nMotorEncoder, in a 'while' loop)
6) Repeat process for other motors. (steps 1-5)
7) Loop entire program (a 'while(true)' loop encompassing the whole thing would work)

Some tips:
-You may want to clear all the encoders at the start of the program, and make sure the arms are physically in the same position. That way they have a shared, zeroed start point.
-Think about how you want the robot to work in plain English, and then look for code to execute your task.
-nMotorEncoder and nMotorEncoderTarget are going to be your best friends with this program; however, remember how the motors are orientated, and make sure a positive rotation on one isn't causing a negative rotation on the other (it shouldn't but never assume!).
-On that note, check and double check to make sure the motors are plugged into matching ports; if your wrist on the 'master' is in A, the wrist in the 'slave' should be too (to cut down on the confusion).

***5 minutes of planning can save you 5 hours of frustration; trust me, been there done that :)***

I'm pretty excited for this one and look forward to seeing what you come up with. If you get stumped or need any more help, definitely let us know, we're more than happy to help. Keep us posted!

Page 1 of 1 All times are UTC - 5 hours [ DST ]
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group