-
Notifications
You must be signed in to change notification settings - Fork 0
/
TestBoard.c
63 lines (55 loc) · 1.44 KB
/
TestBoard.c
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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#pragma config(Motor, port1, Sm1, tmotorServoContinuousRotation, openLoop)
#pragma config(Motor, port2, Sm2, tmotorServoContinuousRotation, openLoop)
#pragma config(Motor, port3, Lm1, tmotorServoContinuousRotation, openLoop)
#pragma config(Motor, port4, Lm2, tmotorServoContinuousRotation, openLoop)
#pragma config(Servo, port5, S1, tmotorServoContinuousRotation, openLoop)
#pragma config(Servo, port6, S2, tmotorServoContinuousRotation, openLoop)
#pragma config(Servo, port7, S3, tmotorServoContinuousRotation, openLoop)
#pragma config(Servo, port8, S4, tmotorServoContinuousRotation, openLoop)
task main()
{
while(true)
{
float servoInitialize;
int motorSpeed;
servoInitialize = 0.0
motorSpeed = 50
if(vexRT[Btn7l])
{
motor[Sm1] = -motorSpeed;
motor[Sm2] = -motorSpeed;
motor[Lm1] = -motorSpeed;
motor[Lm2] = -motorSpeed;
}
else if (VexRT[Btn7r])
{
motor[Sm1] = motorSpeed;
motor[Sm2] = motorSpeed;
motor[Lm1] = motorSpeed;
motor[Lm2] = motorSpeed;
}
else
{
motor[Sm1] = 0;
motor[Sm2] = 0;
motor[Lm1] = 0;
motor[Lm2] = 0;
}
if(vexRT[Btn8l])
{
servoInitialize -= 0.0001
servo[s1] = servoInitialize;
servo[s2] = servoInitialize;
servo[s3] = servoInitialize;
servo[s4] = servoInitialize;
}
else if(vexRt[Btn8r])
{
servoInitialize += 0.0001
servo[s1] = servoInitialize;
servo[s2] = servoInitialize;
servo[s3] = servoInitialize;
servo[s4] = servoInitialize;
}
}
}