|
Re: Cannot program two ultrasonic sensors. Please help us!
You're creating new sensors every time you create new Ultra1 or Ultra 2 commands. That's what's causing the problem.
With WPILib, it's assumed that your sensors don't change during a match so whenever you create a new sensor, it will check if another sensor object has already used those channels. Your sensor variables should be in the appropriate subsystems. Look at the GearsBot example program in Eclipse to see how you should structure your code
__________________
WPILib
GRIP, RobotBuilder
|