IR Sensor Java Programming

For our 2020 robot for infinite recharge, we are looking at utilizing an IR Sensor connected to the DIO ports of the roborio and we are unsure of the means of programming this sensor so when a ball is detected within a certain range, it would activate our shooter.

We are using this sensor: https://www.amazon.com/Adafruit-Accessories-Break-Beam-Sensor/dp/B01BU6YBWU

Use the getter method in the DigitalInput class. It will return true when the beam is detected and false when it is broken.
edit: I can’t type

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