Hi again,
Aside from the CNC dream I have in my other post, I have this little fun device going... Its a pan and tilt setup I ordered from Robot Turrets. It was less than $30 and came with 2 servos.
He wrote it a year ago, and kinda stopped talking about it in his blog. It looks like hes moved on to a sick auto pilot project, so I can see why hes not messing with this anymore. I tried to contact him, but he has not emailed me back yet.
Anyway, I am really new at all of this and I have a few questions about this code. I know its way over my head...
First: It seems that I dont get full range of motion in either direction.
Second: The vertical axis is reversed, and I cant seem to find in the code where it calls for that.
Last: If you press and hold both the "C" and "Z" buttons together you can control with the joystick, where is the code is that? or is it a bad wire job?
Heres a crude wire diagram.. And a little more info on the program.
It has 7 levels of "smoothing" the level increases with every push of the "C" button. I have replaced one of the smoothing leds with a laser pointer. The "Z" button turns the smoothing off one level at a time.
The laser pointer was about the size of a pencil and only a few inches long. I took it apart and bypassed the switch so it was always on.
(reversing rotation angle at time it is sent to servo)
ServoControl(int pin, int neutral = 1500, int range = 800) : (extends the range of motion on the servos. On mine, both axis go the full swing in one direction, but only about 80% to the other)
I'm using this sketch to make a wii controlled water shooter. My nunchuck was giving me opposite movement for yaw (x) so fixed it with this small change to the code
yawServo.SetRotation(-xAnalogPos);
I need just one level of smoothing (equivalent to level 3 in this sketch) and always on, as I need the c and z buttons for other functions. Any suggestions how to do this?