You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Both motors will be connected to the same controller and will run at the same time. When the ControlPanel wants to run its code it should disable the Hopper from running the carwash (frontMotor in the code!). It should do this by setting a boolean in Hopper.java. The hopper will then check the boolean every time it attempts to change the state of that motor. The control panel should also set the value back to its original when it is done using the motor.
You might be able to have two separate motor objects that control the same motor. In that case, you can just set the Control panel motor to the same id as the car wash motor. If not you'll need to make a method in the Hopper to return its motor object. I'll do some testing and get back here if you need to do the latter.
The text was updated successfully, but these errors were encountered:
Both motors will be connected to the same controller and will run at the same time. When the ControlPanel wants to run its code it should disable the Hopper from running the carwash (
frontMotor
in the code!). It should do this by setting a boolean inHopper.java
. The hopper will then check the boolean every time it attempts to change the state of that motor. The control panel should also set the value back to its original when it is done using the motor.You might be able to have two separate motor objects that control the same motor. In that case, you can just set the Control panel motor to the same id as the car wash motor. If not you'll need to make a method in the Hopper to return its motor object. I'll do some testing and get back here if you need to do the latter.
The text was updated successfully, but these errors were encountered: