|
Re: Example Robot Java Project
First you'll need to make sure you know which axis goes to which joystick. Don't connect up your robot motors (you might not even need to enable it, I can't remember) and in the driverstation there will be one tab on the left side you can click that will show you a bunch of buttons and sliders that correlate to user input from the joystick. This will tell you what # you need for the getRawAxis(#) function.
You can use either the Getting Started project or the Tank Drive one. Getting started uses Arcade drive, Tank drive uses...Tank.
Either way you'll need to make sure to have a couple of things mapped correctly in the code:
Which joystick axis do you need to use (using the above method)
Which motors need to get powered - this is determined by where your PWM cables are plugged into the rio.
If you have 2 CIMs per side - I highly recommend disconnecting one from power and ensuring they both treat forward as the same direction independently. It's a good way to burnout motors or mess up gears if they're fighting each other and you keep trying to make it move.
Probably common sense - but since it's a rookie year I want to say this just in case: I also highly recommend putting the robot up on blocks and everything is free and clear of belts/chain/wheels until you feel comfortable it's not going to go anywhere unexpectedly.
__________________
Team 451 The Cat Attack, Student Alumni (2005)
Team 1646 Precision Guessworks, Mentor (2006-2008)
Team 2936 Gatorzillas, Mentor (2011-2014)
Team 5414 Pearadox, Mentor (2015-Present)
|