![]() |
Java help
I am part of team 4592 and I took on the task of being programming captain. I don't know much and i need some help. I need to run a motor while a button is being pressed and held. I've gone through wpilib and can't figure it out. Thanks to anyone who can help it is greatly appreciated.
|
Re: Java help
WPILib resources:
Screensteps API Reference (Java) API Reference (C++) Using the command based architecture, you need to first create a subsystem that the motor belongs to Code:
public class MyMotorSubsystem extends Subsystem {Code:
public class CommandBase extends Command {Code:
// somewhere in OI.java |
Re: Java help
Here is what the above would look like in Java:
Code:
public class MyMotorSubsystem extends Subsystem {Code:
public class CommandBase extends Command {Code:
// somewhere in OI.java |
Re: Java help
2016 was our first year with Java too, and being the sole programmer, I kinda got thrown into the fire. Here's our code from 2016. Its mostly very simple command-based stuff, but if you have any questions you can PM me. Hope that helps!
|
| All times are GMT -5. The time now is 17:48. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi