![]() |
Help?-Vex pro Spike Switch?
Dear Interwebs,
This is team 4254. This is our rookie year and we need a little help with programming. We have a two person programming team and we both know java from high school courses. We have our robot driving around but we are having difficulties programming the Vex Pro Spike switch. Please help us! Thank you. |
Re: Help?-Vex pro Spike Switch?
I realize that i gave no info about our problem, but we really have nothing done. We have tried many things but none of them have worked and i think if we just saw an example of code that worked it would help us out a boat load
|
Re: Help?-Vex pro Spike Switch?
Quote:
Code:
import edu.wpi.first.wpilibj.Relay;Code:
Relay Tom = new Relay(PORT YOU PLUGGED THE PWM WIRE INTO ON DSC);Code:
Tom.set(Relay.Value.kForward);Edit: After a quick check this seems correct. To disable the relay, use this: Code:
Tom.set(Relay.Value.kOff); |
Re: Help?-Vex pro Spike Switch?
Quote:
Thank you very much. We will be sure to try that when we get our connection to the robot back.... |
Re: Help?-Vex pro Spike Switch?
Code:
Relay Tom = new Relay(PORT YOU PLUGGED THE PWM WIRE INTO ON DSC);Specifically the PORT YOU PLUGGED THE PWM WIRE INTO ON DSC part. |
Re: Help?-Vex pro Spike Switch?
Quote:
The rest of the code just initializes the relay using the port. Everything is an object. |
Re: Help?-Vex pro Spike Switch?
The ones in red are the relay ports |
| All times are GMT -5. The time now is 10:38. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi