|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#31
|
||||
|
||||
|
Re: functions for auto
Quote:
Code:
chassis.arcadeDrive(-0.25, angle * Kp); Also, I assume you want this code to use the gyro to keep straight. In this case, you might want to add a reset() before the while(true) loop to ensure the gyro is 0. Code:
turn(90); //COULD 90 OR 180! in Robot.java Code:
Auto.run(this, autoMethod); also in Robot.java Code:
public AutonManager autonManager; //PUBLIC OR DOES IT MATTER? autonManager = new AutonManager(this); Code:
it would be greatly appreciated I am hoping this will all work for Wednesday we are having a little show casing with other schools. Your "kP" value(s?) need to be tuned, the 0.01 I gave you was just a rough estimate. For example, if it doesn't turn fast enough, than this should be increased to 0.015 or something. If it turns too fast, than it should be 0.005. If it's turning the wrong way, than it should be -0.01. (honestly, I'd probably start off with 0.035, seems like a decent starting number) |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|