V5 Motor disconnect warning on controller

I have an issue with my flywheel motor, number 6 randomly disconnecting from the brain and the flywheel not working correctly.

I would like to have some sort of rumble and alert on the controller to let me know if a motor has disconnected, and which one has disconnected, just by showing a number or something. On the controller. I just figured out rumble, and I know how to type something on the controller, the hard part is getting the brain to tell you that the motor is disconnected.

Keep in mind that I am using block code, and I don’t really care how long the code is to get it to work.

1 Like

A way to not need to make this, (as I’m pretty sure it is not possible), is to just switch the port or wire of the motor so that a disconnect doesn’t happen.

Hope this helps, will be happy to help with anything else!
- Henry 344E

I know you can definitely do that, In fact port 1 on the brain was dead, so my drivetrain is actually motors 2,3,4, and 9. This is because I ran out of holes on the top of the brain, and the bottom of the brain is very out of the way and low to the ground, so It’s not exactly an option for plugging things into. I kinda just want a way to tell when it disconnects so I know not to use they flywheels during a match so i don’t damage them.

It is not possible to detect disconnects. You also mentioned ports 2, 3, 4, and 9. Is port 5 open?

You can detect device disconnects using text, but not blocks.


Ports 2,3,4,9 are drivetrain
Port 8 is the intake
Port 6 and 7 are the flywheels
Port 5 is the indexer
Port 1 and 10 are both dead
The one on the side is the radio (21?)

How? I think most things in text do carry over to blocks. The only thing I’ve found is missing is a toggle, but that’s a work in progress.

The installed() motor class member function will tell you if a motor is installed on a particular port. example of use.

    while(1) {
      for(int port=PORT1;port<PORT22;port++) {
        vex::motor m(port);
        if( m.installed() ) {
          // do something with a detected motor
        else {
          // no motor on this port