Active Sensors detection

Hello, Forums, does anyone know how to inform the cortex that a sensor may be disabled(came out of the cortex; etc.)? Sometimes, the pins in the cortex come out even with the cortex clips on, and this problem does not help during autonomous and doesn’t help when some of the robot’s functions are done autonomously.

It sounds like instead of making complicated code, simply zip tie the wires to the cortex. Never fails (at least for us)

True. Or even better, use the F o r c e to move your robot in auton

Well I tried that once and got DQ’d for “interacting with the robot during auton”

I used light sensors to control my auton with pieces of colored paper from outside the playing field. (Red == go forward, Blue == go backward, etc.) My rule breaking went under the radar, but one time my sensor got unplugged and I was disqualified when my robot jumped out of the field and attacked a refferee. (Not true)

You must not be an inexperienced jedi, you can control the ref’s minds stupid.

That only works on the weak-minded. The ref appeared to be a superior being, with enhanced intelligence. He was wearing a strange shirt made of black and white stripes. He had circular rings of special metal around his eyes. And he carried a strange gadget in his hand that could magically add up the scores on the field. I didn’t dare try to do the Jedi mind trick on him.

If what you say is true about him I wouldn’t try either

That sounds good, but it’s not only about the pins coming out, but a sensor failure is possible. I experienced this yesterday with a potentiometer failing (registering ridiculous values), even though it was in the cortex.

And this may not require a complex code, it could just be a function already in C.

So I was going to reply saying that sadly the only sensors you could detect robustly would be analog sensors. But you were have an issue with an analog sensor so I guess this will work.

It should be pretty easy to detect if the port is floating (not plugged in). All unplugged analog sensors have roughly the same value, right around 275 assuming I am remembering properly.

Digital ports would be really tricky to do robustly. I am struggling to come up with a better answer than run every mechanism for a quarter second and verify the sensor moved correctly.

So even pretending we have a good system to detect if something is unplugged what would you do with such a system.

If your robot can’t do anything to fix a fault that has been detected is there really a good reason to detect it? You could probably abort all lift related motion if a sensor goes down? Maybe you could switch to running an entirely separate autonomous that used time instead of sensors?

There are some few components controlled autonomously with a press of a button on our robot. When a sensor fails, we get screwed, so instead, when a sensor fails and the cortex detects it, I would want it to switch to manual control (I have to write a program for this of course).

And I mean “screwed” as in, it doesn’t jump out of the function since it’s not complete (they usually include while loops). When this happens, we lose control of that specific component unless we reboot the robot. And yes, I could have a tolerance time to make it jump out of the loop, but it makes driving less smooth for us.

So I would suggest having all your code detect if it fails to complete in a reasonable time. That isn’t too hard.

And analog sensors you can check if they are plugged in easily.

You know, Vex ships all new cortexes with this super handy clip that has never failed for me. Unfortunately, if you loose that clip, it’s game over. Replacement clips you can buy are totally different, (the zip tie ones) which I really don’t prefer. Even zip tied cables can wiggle out pretty easily, and it’s just such a hassle to cut a bunch of zip ties when you want to replace something. The original clips are really awesome, and I wish you could buy them separately. I was going to start another thread about this a long time ago, I guess I got caught up in other stuff.

But I don’t think it’s really worth complaining about at this point. V5 is only a couple months away.

watch them use the same clip system…

Those clips used to be sold separately, until they were replaced with the current zip tie clips. I also prefer the old ones – zip-tying that close to the Cortex only makes it harder to do last minute wiring changes, and the old clips didn’t need zip ties.

Well, all the new sensors will be backwards compatible, sooo…