Can the ColorSensorV3's LED be controlled with code?

Hi,

We are wondering if there is any way to control the brightness of the Rev Robotics ColorSensorV3 LED. We would like to have it disabled for the majority of the match so that we don’t have to have it shining and possibly interfering with camera performance.

Thanks for your help,
Kilroy 339

The OP asked about switching that in code, not manually.

Unfortunately not, the LED is only turned on and off via the switch.

Just a thought, could you wire the power for the sensor into a DIO? Although having a look the voltages don’t match, so perhaps a PWM or analog out?
Disclaimer I haven’t used one yet.

I wouldn’t use a DIO, but with a relay or something you could in theory pull it off. However you would need to re-initialize the I2C communication every time, and be careful to turn it on with enough time.

Now the question is…

Can you rig up something to flip the switch remotely? Technically, it is possible… but can it actually be done.

1 Like

Small servo or a solenoid could do it.

1 Like

I’ve not disassembled one myself (so caveat emptor), but it might be possible to disassemble the sensor, unsolder the switch, and replace the switch with a MOSFET switch or physical relay, and then control that electrical switch from the RoboRIO.

For example, an I2C-controlled physical relay: https://www.sparkfun.com/products/15093