this will be a form were we can post and help each other with auton
for example i need help with how to drive up on to the platform with auton and this is what i have so far
if anyone can test this and see if it works or compare it to yours that would be greatly appricated
Your code should theoretically work. If you want it more precise and consistent consider encoders and a gyroscope. Only ways I can think of making yours better how it is, is to when you turn, have your motors that = 0 spin 127 opposite of what your other wheels are spinning so you have less of a turning circle. Nobody can really test your specific program because it’s made specifically for your program, different drivebases, weight and friction can cause differences. You just have to test and figure out the right times. Good luck!
how can i test autonomass when i rote it in comp code and dont want to download a second program???
i dont have a comp switch to hook up ether
i need to know how to do this
You don’t need a physical competition switch if you have robotc - there is a virtual one you can use to switch between disabled / driver / autonomous.
where i need to know how to do this
I think its on the debugger page for RobotC, but I don’t know what platform you’re using. Would you mind specifying that?
robot c can u show me a photo or a link please???
another question how do u get the remote to hook up wireless ly then to activate the switch like a physical switch
theres a virtual competition switch, go to robot > debugger windows > competition control
it wont let me into debugger what do i have to do
Attach programming cable to controller, download program, leave cable attached, try going into debugger window.
I encourage my teams to use something like the code below so they can test their autonomous. If you move the autonomous code into a separate function, you can call the function from anywhere in your programming (including driver control). Teams use a sequence of buttons to launch the auton. code so you will want a button combination that you won’t accidentally repeat during a match.
#pragma config(Motor, port2, Left, tmotorVex393_MC29, openLoop)
#pragma config(Motor, port9, Right, tmotorVex393_MC29, openLoop, reversed)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
#pragma platform(VEX2)
#pragma competitionControl(Competition)
#include "Vex_Competition_Includes.c"
void pre_auton()
{
bStopTasksBetweenModes = true;
}
//Create a function and move your
//autonomous program into the function.
void myAuton1() {
//move forward for 1.75 seconds.
motor[Left] = 60;
motor[Right] = 60;
wait1Msec(1750);
//Stop
motor[Left] = 0;
motor[Right] = 0;
}
task autonomous()
{
//The following will call the autonomous program during the auton portion of a match.
myAuton1();
}
task usercontrol()
{
while (true)
{
motor[Left] = vexRT[Ch3]; // Left Joystick Y value
motor[Right] = vexRT[Ch2]; // Right Joystick Y value
//If you press 5 Up and 6 Up at the same time it starts your auton function.
if(vexRT[Btn5U] && vexRT[Btn6U])
{
myAuton1();
}
}
}