Is it possible to get the RSL's Current state?

I’ll bite. Why?


You can get enabled status in the code and with some slow mo footage you can probably figure out RSL on and off time when flashing.

If you really wanted to do this you could probably hook up a custom circuit to it… and if there was a rule explicitly forbidding that you could do other crazy things:

  • Use something to sense the current in the RSL wire
  • Add a light sensor on the RSL itself
  • Point your limelight at the RSL

… but really, why?

Some questions don’t need reasons


Have fun!


Fine but cool idea are meant to be shared!

1 Like

Absolute Madman! Thanks!!

So for the people asking the question… WHY??? Originally I was looking into seeing if it would be possible to detect what channel on the PDH the rio was plugged into and or if an RSL light one plugged in or not. Unfortunately the current draw on the RSL is below the resolution of the PDH (For some reason I thought the RSL was incandescent).

Now however there is always fun to be had with addressable LEDS… IE making a synchronized wave to the RSL (And other shenanigan’s). Now just trying to thing of strange ways to use this new found information. :stuck_out_tongue:


Hook up an optical sensor to look at the RSL.


From reading DS logs, I believe the current reported by the PDH has a resolution of ⅛ amp.

1 Like

So I do not know the Specs for the CTRE PDP but for the PDH the specs are as follows.

High current Channels
125 mA Resolution with a max reading of 127.9 A
Low current Channels
62.5 mA Resolution with a max reading of 31.94 A
Ref Here Power Distribution Hub Specifications - Power Distribution Hub

I have had trouble finding exact specs for the PDP but one downside is that the channels used for powering the rio are not monitored.

1 Like

So the high-current channels are using 10-bit, and the low-current 9-bit.

Conclusion: yes, it’s possible, albeit indirectly, using the input current of the roborio. I used this today to sync an LED strip with the RSL for Maximum Safety™.


Hahaha, so glad someone actuality did this. :slight_smile: I totally forgot that there was current sensing on the RIO itself and not just the PDP/H. I have a feeling in a real match this source might be pretty noisily but you probably could get good data on it with enough filtering and modeling. Esp because the RSL blinks at a predictable frequency. Right now I don’t have access to a RIO to test on but want to see if I can get a working java example to call the C code shown in @Ryan_Blue’s Solution :slight_smile:

1 Like

Ryan’s solution is superior since it allows you to change the state of the RSL and not just read it

1 Like

Coming soon to a wpilib beta near you:

Side note: please do not attempt to write to the RSL. Not only is it a tool field staff use to help diagnose issues with your robot, it’s also a critical safety feature.


What if I want to do it for fun?

Don’t, Ryan will revoke your WPILib license


and void your warranty the BSD license doesn’t provide in the first place.


Oh no! I violated the TOS for Linux!


Who are you, Linksys?