|
Re: how to add drive motors?
That's pretty simple.
You only need to modify the use of one icon in Begin.vi.
- Open Begin.vi, then the block diagram
- Locate the Open 2 Motor icon.
- Right-click on Open 2 Motor and go to Replace -> All Palettes -> WPI Robotics Library -> RobotDrive and choose Open 4 Motor
- Delete the two PWM settings left over to cleanup the labels.
- Add constants for all four input nodes and set them to your other two motors.
- Right-click on each of the PWM inputs, go to Visible Items -> Label and let go. The name of the input will appear and you might want to drag it to the left side of the PWM constant.
- Set the PWMs to match where your 4 motors are.
- Create constants for the two Inverted nodes on the bottom of the Open 4 Motor icon.
- Set both the motors on one side of the robot be Inverted. If you guess wrong and the robot drives backwards instead of forwards, just go back into the code and reverse which side gets Inverted.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
|