Go Down

Topic: please help im freaking out like helll.....!! (Read 1 time) previous topic - next topic


Jan 30, 2011, 08:18 am Last Edit: Jan 30, 2011, 08:33 am by hasmar Reason: 1
i just saved up every penny and bought a motor according to my friend.....

the motor i bought was exi b1226 w/ continuous rotation.....
im new to arduino and electronics....i wanted to use this servo to rotate my gun 180 degrees or whatever degrees i needed to make a sentry gun.......Now this gun turns 360.....i was hoping is there a way to have this motor act the same way as a standard servo? like i give it a signal so it doesnt turn all the way n just turns to 60 or 90....please help im getting so depressed having the wrong servos n no money left is the last thing i want.....

PS: What does it mean to GND arduino to same power supply as servo? my guess is connect GND of arduino to negative terminal of battery.


According to the page I found about the exi b1226 it's not a 360 modified servo, so just use the Arduino Servo library to control it.

If it has been modified I don't think you can use it as you would like without adding some form of feedback so you know the position of the motor.

my guess is connect GND of arduino to negative terminal of battery.

Correct, both the Arduino and the servo should have their - wires connected to the power supply's -.

Rob Gray aka the GRAYnomad www.robgray.com


You will probably need an encoder for this if it rotates 360 degrees .

Wagner Sartori Junior

take a look what my friend did to serve as an inspiration:


He's using opencv on the computer to run the servos plugged on arduino using processing.


the motor i bought was exi b1226 w/ continuous rotation.....

Hi hasmar,
My project is very similar to what you are trying to do. It is an Arduino/processing based sentry gun, that uses a webcam and servo motors. Normally, I use standard servo motors - these go from 0 to 180 degrees, and you tell them a position to go to. However, I have also used continuous rotation servos - you tell them a direction to turn, and how fast to move.
So, I already have code that you can use for this: it is version 1.0 at http://code.google.com/p/airsoft-sentry-gun/downloads/list.

All you will need for sensors are two buttons or limit switches, to detect the left and right turning limits of the gun. The servo motor you have will work just fine, with a gun-mounted webcam.

Feel free to contact me or reply with any questions!
~Bob (sentryGun53)
Build your own sentry gun! http://psg.rudolphlabs.com

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131