HELP!! How to powercycle?

does anyone know how to power cycle the cortex and joystick?!?!

Power cycling just means completely turning off all power and then turning it back on.

“turn off All power” may include unplugging the 9V backup battery, and the battery connected to power expander.

If that doesn’t work, and you are wiling to go as far as to re-flash the firmware,
both the joystick and the cortex have a “paper-clip-reset” button hole.
Hold them down until the LEDs flash differently (~5-20 seconds?)
and they re-connect the USB A-A cable to a PC
and use the IFI VEXnet Firmware update program.

ok so i tried the firmware thing several times. didnt work. link between the cortex and joystick is fine all green lights. but i think all the programs are not writing to the cortex. the GAME light never blinks.

The GAME led will only light if you are connected to a competition switch or the field controller. Are you programming with EasyC or RobotC?

i also tried turning it on and off and taking out the batteries to powercycle. no luck

i use robotc

Can you post your code here? That might help us debug the problem.

#pragma config(Sensor, in1, gyro, sensorGyro)
#pragma config(Sensor, in2, accelx, sensorAccelerometer)
#pragma config(Sensor, in3, accely, sensorAccelerometer)
#pragma config(Sensor, dgtl1, liftEncoder, sensorQuadEncoder)
#pragma config(Motor, port6, left, tmotorNormal, openLoop)
#pragma config(Motor, port7, right, tmotorNormal, openLoop)
#pragma config(Motor, port8, horizontal, tmotorNormal, openLoop)
#pragma config(Motor, port9, lift, tmotorNormal, openLoop)
//!!Code automatically generated by ‘ROBOTC’ configuration wizard !!//

void manualDrive()
{
motor[left] = vexRT[Ch3] + vexRT[Ch1];
motor[right] = vexRT[Ch3] - vexRT[Ch1];
motor[horizontal] = vexRT[Ch4];
}

void manualArm()
{
if(vexRT[Btn5U] == 1)
{
motor[lift] = 127;
}
if(vexRT[Btn5D] == 1)
{
motor[lift] = -127;
}

if(vexRT[Btn5D] == 0 && vexRT[Btn5D] == 0)
{
motor[lift] = 0;
}
}

void updateLCD()
{
clearLCDLine(1);
displayNextLCDNumber(SensorValue[gyro]);
}

task main()
{
manualDrive();
manualArm();
}

manualDrive() & manualArm() should be in a while loop

so kind of like this

task main()
{
while (true)
{
manualDrive()
manualArm()
}
}

The problem with your code is the functions / procedures (manualDrive() & manualArm()) are not continuously running.

ok so i just did that. still does not work

I just noticed you are not using the competition template.

Can you copy your code into the competition template and try again?

i just got it to work. thanks for the help everyone

If you are testing standalone then it does not matter if you are using the competition template or not. You will be in driver controlled mode with or without it.

I just tried this for you, basically the same code, fixed one small bug in your manualArm function, deleted the stuff you are not currently using. This runs OK.

#pragma config(Motor, port6, left, tmotorNormal, openLoop)
#pragma config(Motor, port7, right, tmotorNormal, openLoop)
#pragma config(Motor, port8, horizontal, tmotorNormal, openLoop)
#pragma config(Motor, port9, lift, tmotorNormal, openLoop)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//

void manualDrive()
{
    motor[left]       = vexRT[Ch3] + vexRT[Ch1];
    motor[right]      = vexRT[Ch3] - vexRT[Ch1];
    motor[horizontal] = vexRT[Ch4];
}

void manualArm()
{
    if(vexRT[Btn5U] == 1)
        motor[lift] = 127;
    
    if(vexRT[Btn5D] == 1)
        motor[lift] = -127;

    if(vexRT[Btn5U] == 0 && vexRT[Btn5D] == 0)
        motor[lift] = 0;
}

task main()
{
    while(1)
        {
        manualDrive();
        manualArm();
        }
}

So a few questions for you.

How have you determined it’s not working?
Are you downloading through the joystick?
Can you see the motor values change in the debug motors window?
Any chance you left RobotC using the PC emulator? (robot menu, compiler target)
Motors plugged into the correct ports, battery on?

Guess I posted too slow. Anyway, good luck. What was the problem?

Yeah I guessed that it might have been the problem but didn’t want to say it - basically, your driver control code needs to be in a while(1) loop so that it keeps going back to the beginning of that bit of code. Otherwise, it will execute the code you’ve written once and then stop and terminate the program. Since your code was just taking inputs from the joysticks and then converting it to the motor output, it happens really really really quickly, and it looks like the code hasn’t downloaded properly, when actually it’s just already finished the program. Using the while(1) loop means that it will keep going back to the beginning of that bit of code, checking the inputs from the joysticks and updating the motor values.

Hopefully that helps for the future!