SLAVE CPU COMMUNICATION BROKEN IN ROBOTC AFTER INSTALLING PROS

I recently installed PROS for atom and downloaded to the cortex. Now everything is going wrong and I need to test if it’s PROS or just programming in general. So I’ve been attempting to download my old code to the robot in RobotC but ever since I installed PROS the communication with the Slave CPU has stopped, even though master CPU communication is working.

All RobotC firmware is installed.

Try installing ROBOTC firmware again and powercycling. Regarding your issue with PROS, if you want to share/DM me your code, I’m sure we can figure out what’s up.

If RobotC firmware installed properly, your issue is unrelated to PROS.

It seems as though someone was having a similar problem here, with no mention of PROS:
https://vexforum.com/t/robotc-failed-to-verify-that-the-serial-link-is-connected/38575/1

Try downloading over a direct USB connection, that may at least be a temporary solution.

My code:
/** @file opcontrol.c

#include “main.h”

/*

  • Runs the user operator control code. This function will be started in its own task with the

  • default priority and stack size whenever the robot is enabled via the Field Management System

  • or the VEX Competition Switch in the operator control mode. If the robot is disabled or

  • communications is lost, the operator control task will be stopped by the kernel. Re-enabling

  • the robot will restart the task, not resume it from where it left off.

  • If no VEX Competition Switch or Field Management system is plugged in, the VEX Cortex will

  • run the operator control task. Be warned that this will also occur if the VEX Cortex is

  • tethered directly to a computer via the USB A to A cable without any VEX Joystick attached.

  • Code running in this task can take almost any action, as the VEX Joystick is available and

  • the scheduler is operational. However, proper use of delay() or taskDelayUntil() is highly

  • recommended to give other tasks (including system tasks such as updating LCDs) time to run.

  • This task should never exit; it should end with some kind of infinite loop, even if empty.
    */
    void operatorControl() {
    // Motor Deceleration for readability
    int front_left = 1;
    int back_left = 2;
    int back_right = 3;
    int left_arm = 4;
    int right_arm = 5;
    int front_right = 10;

    while (true){
    //Threshold value deceleration
    int TH = 15;
    int y1;
    int y2;
    bool is_locked = false;

    if(joystickGetDigital(1, 7, JOY_UP) == true){
    motorSet(4, 100);
    motorSet(5, 100);
    }

    if(joystickGetDigital(1, 7, JOY_DOWN) == true){
    motorSet(left_arm, -100);
    motorSet(right_arm, -100);
    }

     // Checks if the threshold for deadzones is exceeded
     if(TH <= abs(joystickGetAnalog(1, 3))){
     	y1 = joystickGetAnalog(1, 3);
     }
    
     else if (TH >= abs(joystickGetAnalog(1, 3))){
     	y1 = 0;
     }
    
     if (TH <= abs(joystickGetAnalog(1, 2))){
     	y2 = joystickGetAnalog(1, 2);
     }
    
     else if (TH >= abs(joystickGetAnalog(1, 2)) ){
     	y2 = 0;
     }
    
     //Sets motor values based on wether or not the value has been exceeded
     motorSet(front_left, y1);
     motorSet(back_left, y1);
     motorSet(front_right, y2);
     motorSet(back_right, y2);
    
     //Locks and unlocks motors
    

    if(joystickGetDigital(1, 8, JOY_UP)){
    motorSet(left_arm, 100);
    motorSet(right_arm, 100);
    }

    /*
    else if(joystickGetDigital(1, 8, JOY_UP) && is_locked == true){
    motorSet(left_arm, 0);
    motorSet(right_arm, 0);
    }

     if(is_locked == true){
     	motorSet(left_arm, 10);
     	motorSet(right_arm, 10);
     }
    
     if(joystickGetDigital(1, 8, JOY_LEFT)){
     	motorSet(left_arm, -50);
     	motorSet(right_arm, -50);
     }
    
     if(joystickGetDigital(1, 8, JOY_RIGHT)){
     	motorSet(left_arm, 50);
     	motorSet(right_arm, 50);
     }
    
     else{
     	motorSet(left_arm, 0);
     	motorSet(right_arm, 0);
     }
    

    */

    }
    }

Currently, the only if statement in the “Locks and unlocks motors” section is not working. As soon as the robot turns on the button can be pressed and the arms swing out, but then once the code has been executed once, it won’t happen again. This is true for the commented out section as well.

Tried it over weird, still not able to communicate. Very strange since PROS download is working. That’s why I assumed that PROS was making the COM port busy, but even after closing and rebooting my computer, it still won’t work with RobotC.

Make sure both the master and user firmware are downloaded to the cortex, this has to be done manually since RobotC flashes it’s kernel separately unlike PROS which builds and flashes user code and kernel together

Otherwise its either an issue with RobotC or (probably) master firmware
If it tells you master firmware is already up to date you can forcefully re download by holding the config button and turning on and off the cortex to put it into bootloader mode

PROS will overwrite the RobotC firmware so after using it you have to download the RC firmware again. There should be no need to update the master firmware or anything like that.

update_rc_1.png

You can check that all is good by performing a software inspection afterwards.

update_rc_2.png