PDA

View Full Version : servo control via bluetooth or wifi



monsieurpo
06-05-2010, 12:38 PM
hello i want to control 3 servo at the same time by pressing a button

example:

servo 1 = 30 degre
servo 2= 40 degre
servo 3 = 15 degre

can someone send me a exemple code in whatever language

my second question is if i want to control a servo via bluetooth i will plug a bluetooth antena in the mcu but will i need to change the code or no?


sorry for ¸my bad english if you dont understand tell it to me please

darkback2
06-05-2010, 01:24 PM
Ok, so here is where a lot more information is necessary.

1) What type of MCU
2) What type of servos
3) how exactly are you connecting the bluetooth device (what is it?)
4) What sort of project are you working on. (knowing this will help because people might be able to suggest other ways to accomplish the same thing such as xbee or wifi and so on.)

Basically the more info you give, the better people can help you.

monsieurpo
06-05-2010, 04:37 PM
probably an

axon mcu
i want to build a walker (lynxmotion brat) or an hexapod if i can code it i will buy it in trossen store

Amp
06-06-2010, 08:37 AM
Hi monsieurpo.

Servo Stuff:
http://www.arduino.cc/playground/ComponentLib/Servo
http://principialabs.com/arduino-serial-servo-control/

The code on these sides should work code on your axon as they both use the AVR Mega Family. You will just have to modifiy which port they are on.


Bluetooth Stuff:
I have been getting a bluetooth link working recently. I used a bluegiga chip, which I think is in the bluesmirf module ... dont quote me but it looks the same. I found that quite easy to use as it appears as a serial port on the PC, and connects straight to a UART on the micro. Here are a few links I found when researching. They all seam to use the bluesmirf module and there are a couple of tutorials on how to use it. The last link is for an AVR Xmega chip, to allow you to use printf statements which are sent back to the PC over uart!!!

http://www.sparkfun.com/commerce/product_info.php?products_id=582
http://wiring.org.co/learning/tutorials/bluetooth/
http://blog.narobo.com/2008/08/bluetooth-controlled-lights.html
http://www.lynxmotion.com/images/html/build125.htm
http://blog.frankvh.com/2009/11/14/atmel-xmega-printf-howto/ <--- Very usefull for debugging.

I hope these links help you get started.

monsieurpo
06-06-2010, 09:30 AM
if i want to add bluetooth is that just wiring or i will need to code more
because i dont want to code more
can i control a robot with something that dont need programing
(of course i will program something but i dont want to code the bluetooth thing)

lnxfergy
06-06-2010, 10:54 AM
if i want to add bluetooth is that just wiring or i will need to code more
because i dont want to code more
can i control a robot with something that dont need programing
(of course i will program something but i dont want to code the bluetooth thing)

If you buy a bluetooth module which has a serial interface, it will be no different than coding any other serial interface. Most of the bluetooth modules sold by online stores catering to hobby/education will meet this requirement - but check the specific module to see. The code you write to interface to a one of these modules has nothing to do with bluetooth itself, it's standard serial port communications. Most controllers have a library for serial IO that is as simple as setting the baud, and reading/writing bytes. How the robot uses this data to decide what to do (walk, sit, etc) depends on the robot itself.

As for whether the bluetooth module would be a drop in replacement without recoding, it depends on the robot. Robots like the Lynxmotion Phoenix use the PS2 controller, which is very different from using a serial port - and so the interface would have to be overhauled. The Axon does have serial ports, so you could interface it to a bluetooth serial module -- but I'm not aware of it having any pre-canned robot control programs (you'll have to write code to control anything).

Without deciding on a particular robot/controller, it's pretty hard for us to answer any other questions.

-Fergs

monsieurpo
06-06-2010, 07:54 PM
If i dont use bluetooth what are the other choices

societyofrobots
06-08-2010, 11:31 AM
probably an axon mcu
i want to build a walker (lynxmotion brat) or an hexapod if i can code it i will buy it in trossen store
You can find free source code to both the lynxmotion brat and hexapods here:
http://www.societyofrobots.com/axon/axon_examples.shtml

monsieurpo
06-08-2010, 06:40 PM
but i need to add one servo on it (i want to build i mobile bb gun turret)

zoomkat
06-08-2010, 08:03 PM
Lot of post concerning the BRAT below. You may want to read some of these to see what others have done with the BRAT so you can get an idea what you will need.

http://www.lynxmotion.net/viewforum.php?f=7

monsieurpo
06-27-2010, 07:07 PM
should i use the ssc 32 or i should program it (i want to control the robot so i dont think programation needed if i use ssc 32)

monsieurpo
10-20-2010, 07:57 PM
ok finaly can someone really help me my goal is to get 2 servo moving to 45 degre when i press a keyboard button so please send as many stuff that can help me or make me a tutorial :) it would be awesome

mannyr7
10-21-2010, 10:12 AM
If you already have an ssc-32 and don't want to do any proogramming, lynxmotion's SEQ program can do this. There is also a tutorial over there on Bluetooth to ssc-32. Let Google be your friend.