Quote:
Originally Posted by SuperBK
You can also specify the servo min and max pulse widths in the attach call:
Servo driveServo;
driveServo.attach(3, 1000, 2000); // TALON // widths are in micro-seconds
Then use servo.Write() 0 is reverse, 90 is stop, and 180 is full forward.
I would still calibrate the Talon (or other motor controller) to ensure it goes full speed. Write an arduino sketch that starts at neutral and waits for a character to arrive from the serial port. Then have it switch to servo to full speed forward, wait for another character and then go full reverse. After waiting for another character, go to neutral. Use Serial.Print to tell the user whats going on and prompt for a character. If you use the serial port monitor in the arduino IDE, you will have to click the "Send" button after each key.
One other thing: I put a 330 ohm resistor in series with the white wire driving the PWM input on the Talon so it doesn't try to drive too much current through its input opto-isolator.
|
This is pretty cool, I'm going to try this. Do you think if I mod the servo call to attach(1500,2000) it will only go forward? Also, I can just do the digitalwrite() function to control this right?
Thanks!