-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPIDUsage.java
More file actions
25 lines (18 loc) · 754 Bytes
/
Copy pathPIDUsage.java
File metadata and controls
25 lines (18 loc) · 754 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
public class PIDExample
{
public static void main(String args[])
{
MySourceClass in = new MySourceClass();
MyOutputClass out = new MyOutputClass();
Encoder enc = new Encoder();
Motor motor = new Motor();
// Create a MyPidController object using my custom source
// and output classes.
MyPIDController controller = new MyPidController(in, out);
controller.calculate();
// Create another MyPidController object using regular
// encoder and motor classes from the FIRST library.
MyPIDController controller1 = new MyPidController(enc, motor);
controller1.calculate();
}
}