Infrared Beacon and Sensor Diagnostics Code Released

I’ve written some code that I hope will help teams diagnose infrared beacon and sensor problems. Running on the FRC-RC, the code will send to the console window a dump of all raw data generated by the receiver code every two seconds. The zipped file, frc_diagnostics.zip, can be found here.

-Kevin

Thanks, Kevin. I’m sure there will be many appreciative teams out there. Thanks for all your code contributions. :slight_smile:

Thanks. It’s really cool knowing that a few thousand people have looked at my (and Rich Petras’) code and maybe learned something by it. I’ve had many great e-mail and IM exchanges with students who clearly understand how this stuff works and wanted to learn more about topics like control theory and digital signal processing. Inspiring HS students to want to learn more about cool stuff like this is one of the many reasons I really, really dig FIRST.

-Kevin

Can you make general debug code? Like last night, I could have used something that told me about the analog ins.

It doesn’t need to be complex, just use the printf and a structure like this:
PortType_## Value
DigI 1-18 0-1
DigO 1-18 0-1
AnaI 1-16 0-1
Rly 1-8 -1-1
Pwm 1-16 0-255 (Just in case)

Making a VB prog to read them would be easy. Heck, I could do it tomarrow :yikes:. Well, a little later.