Driver Statn and Inputs

I am trying to have the driver station read relay movement, Microswitches, and

I tried getDigitalIn() for the Microswitches, but having the driver station class on getInstance, when I switch to teleopPeriodic, it says RobotDrive not updated enough on a 5 ms delay. The teleop worked after moving it. DriverstationLCD works, but not the driver station class.

Any suggestions?

It seems like your code that was sending to the driver station was delaying your iterative loop for some reason. Was teleop completely broken? Also, was it RobotDrive that was giving you the delay message? I’d expect PeriodicRobot to do that.

It could be that DriverStation.getInstance() or DriverStation.getDigitalIn() is taking too long to return.

Can you post the part of the code that has the issue?

Also, you may want to look into SmartDashboard.

You should be using the setDigitalOut() method to do that, not getDigitalIn(); that method returns the state of a digital input on the Driver Station, not the DSC.