Calibration:
Prior to beginning assembly of the FlashBob, you will need to calibrate the servo motors.
You’ll need an Arduino nano, Arduino nano expansion shield, Servo motors, Arduino IDE and a permanent marker pen
Step 1: Download and install Arduino IDE
Step 2: Download and open the calibration code
// Create four servo objects for four motorsServo leftLeg;Servo rightLeg;Servo leftFoot;Servo rightFoot;
// Define the left, right and center position of the servosint leftPosition = 0;int rightPosition = 180;int center = 90;
void setup() {// Attach servo motors to arduino digital pinsleftLeg.attach(3);rightLeg.attach(5);leftFoot.attach(6);rightFoot.attach(9);
// Move the motors to the leftleftLeg.write(leftPosition);rightLeg.write(leftPosition);leftFoot.write(leftPosition);rightFoot.write(leftPosition);
//wait for a seconddelay(1000);
// Move the motors to the rightleftLeg.write(rightPosition);rightLeg.write(rightPosition);leftFoot.write(rightPosition);rightFoot.write(rightPosition);}
void loop() {// Move the motors to the centerleftLeg.write(center);rightLeg.write(center);leftFoot.write(center);rightFoot.write(center);}
Step 3: Connect Arduino board to the arduino shield
Step 4: Connect Arduino nano to the computer using mini USB cable
Step 5: Go to Tools → Boards → Arduino nano
Step 6: Go to Tools → Ports → Select port number (COMXX on Windows, usbserial on mac)
Step 7: Connect Servo motors to Arduino Digital pins 3, 5, 6, 9
Step 8: Upload the program. you should see the motors move to a set position.
Step 9: Take your permanent marker pen and draw a line across the servo motor body and the motor spindle. This line serves as a calibration line in case the motors get moved during assembly.
Warning: Don’t be tempted to turn these by hand, the torque provided by your mighty strength could strip the servo gears.
Powered by BetterDocs
Cart