Running the same version of code on several ‘bots, simplified

You may want to run your new code on several ‘bots, for testing, driver practice, etc. There’s a way to do this without a build unique to each ‘bot. Remember that an unconnected DIO pin, configured as an input, is guaranteed to read as a 1/true: NI roboRIO User Manual => Figures 16 and 17; Page 16:

When a DIO line is floating, it floats in the direction of the pull resistor

On one ‘bot just leave the DIO port unconnected (true), on the other ‘bot ground that DIO pin (0/false): with a PWM cable, connect its white wire to the black wire (remove the red wire, it’s unused) and plug it into the same numbered DIO port. Your program will reliably read that DIO port true on one ‘bot, and false on the other.

The same program can then have constants such as wheel diameter, encoder count, etc. different for each ‘bot.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.