Is my GPS sensor dead?

Hi all. I have written some code for my GPS sensor, and it spins in a circle. When I plugged in the GPS sensor and the light was flashing, I assumed it was a port issue and tried many things such as switching the cord, moving ports, trying motors with the same conditions, etc. I’m down to the conclusion that my GPS sensor is probably dead, and wanted to either try and see if that ounce of hope is worth it, or see if it’s repairable.

When using GPS.display(), it returns a 0. It doesn’t show up on the devices on the V5 brain. GPS strips are properly installed on the field I tested it on. Included below are both the code I used, a GIF of the phenomenon happening, and the V5 brain not detecting it. It is plugged into port 1. (excuse the bad angle).

  while (GPS.isCalibrating()) { task::sleep(25); }
  Drive.setHeading(GPS.heading(), degrees);
  Drive.setTurnVelocity(100, percent);

  float startingX = GPS.xPosition(mm);
  float startingY = GPS.yPosition(mm);

  float endingX = 0;
  float endingY = -1000;

    float turnAngle = atan((endingX - startingX) / (endingY - startingY)) * 180 / M_PI;
  if (endingY - startingY < 0) {
    turnAngle = turnAngle + 180;
  Drive.turnToHeading(turnAngle, degrees, true);
  float driveDistance = sqrt(((endingX - startingX) * (endingX - startingX)) + ((endingY - startingY) * (endingY - startingY)));
  Drive.driveFor(forward, driveDistance, mm, true);
Blinking Light


No Sensor on Brain

Thank you!

1 Like

Has the brain’s firmware been upgraded?


Yeah… that was it
Thank you so so much, I can’t believe it was as simple as that. I was unaware I needed an update because I plug into the controller to install code.

Seriously, thank you


After a bit of testing, I see my issue. My code is in Vexcode Pro V5, and it overshoots (doesn’t have a gear ratio coded in).
I’m unsure of how to do this, because the auto option only inputs 6 motor drive maximum.

Motor config code
vex::motor FrontRight(vex::PORT19, true);
vex::motor MidRight(vex::PORT3, false);
vex::motor BackRight(vex::PORT2, false);

vex::motor FrontLeft(vex::PORT14, false);
vex::motor MidLeft(vex::PORT10, true);
vex::motor BackLeft(vex::PORT8, true);
gps GPS = gps(PORT1, 6.50, 0.00, inches, 90);
vex::motor MogoLift(vex::PORT7, true);
vex::motor MogoHold(vex::PORT4, false);
motor_group   LeftDrive(FrontLeft,MidLeft,BackLeft);
motor_group   RightDrive(FrontRight,MidRight,BackRight);
smartdrive Drive = smartdrive(LeftDrive, RightDrive, GPS, 259.28955, 393.7, 381, mm);
vex::controller con(vex::controllerType::primary);

Edit: I figured it out by adjusting the distance per rotation in correspondence with my gear ratio


Thank you for posting the code. We’re just starting out with the GPS and we are wondering if we need to create motor groups. Are those different than creating a 4-wheel Drivetrain (we use 4 motors, not six) Thanks for any advice!

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.