6 LEDS with coordinating motors

EDIT :
We have encoders on all of the motors , is there anyway to do this?

Hey everyone,
Thanks for a quick response to my last question, jpearman, anyway I have another question :

I hope it’s not too complicated but basically we would like to use three green LEDs and three red LEDs for the three sections of our robot, four motors for the drive train, 6 with a y cable and battery extender for the arm and two with a y cable for the pinchers on the arm. We have had lots of problems with cables unplugging. Our idea is to have each section correspond to a red and a green LED, example;
Drivetrain = green LED in dgt1 and red LED in dgt10
All arm motors = green LED in dgt2 and red LED in dgt11
Pinchers = green LED in dgt3 and red LED in dgt12

So is there anyway to have a loop where it basically ‘pulses the motors’ for a response and if there is a response then turn on green LED if there is no response then turn on red LED.

Also it would be the entire section, so if one motor in the arm is unplugged then the led for the arm section would be red.

Lastly, after this happens would I be able to add an animation to the LEDs, like turning them all off, to know that it has updated the lights properly?

Attached is our pragmas!

Thanks in advance!!!
It’s very appreciated!!
Cheers!

(Sorry that the pic is upside down)
FJIMG_20170126_111459.jpg

The only way to test motors is to read a sensor on the part the motor moves. This could be done with an IME, an external encoder, or a potentiometer. But there is no way to directly sense even a circuit completion for the Cortex motor ports. You have no sensors on your robot, so the short answer is that it won’t work.

LED animation is simple, but since you can’t get the data you’re trying to display, it won’t matter much.

If you add in some way to sense that a motor moved, you could tell that one of the motors in an interconnected subsystem was doing something. You still wouldn’t be able to tell whether the individual motors in an arm were working, for instance, since one working motor can move a non-working motor.

Since the monitoring system won’t work (at least not very well) you should probably invest your time in tracking down motor problems and improving the reliability of your build.

We have encoders on all of our motors but they aren’t in use @kypyro

Two issues remain:

  1. You can’t attach more than 8 IME’s at once. It’s a signal quality issue, and there’s no way around it. So, you’d need to choose which ones to hook up. And:
  2. Since the motors driving each subsystem are physically able to move each other (with the possible exception of your actuator mechanism (claw?) depending on how it’s built) then you can’t infer independent motor health by monitoring the motor encoders.

So I think you’re still stuck without a way to make the monitoring work.

Alright Thanks!