-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathServo2 Test.c
30 lines (29 loc) · 1.12 KB
/
Servo2 Test.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
#pragma config(Hubs, S1, HTMotor, HTServo, none, none)
#pragma config(Motor, mtr_S1_C1_1, motorD, tmotorNormal, openLoop)
#pragma config(Motor, mtr_S1_C1_2, motorE, tmotorNormal, openLoop)
#pragma config(Servo, srvo_S1_C2_1, servo1, tServoStandard)
#pragma config(Servo, srvo_S1_C2_2, servo2, tServoStandard)
#pragma config(Servo, srvo_S1_C2_3, servo3, tServoStandard)
#pragma config(Servo, srvo_S1_C2_4, servo4, tServoStandard)
#pragma config(Servo, srvo_S1_C2_5, servo5, tServoStandard)
#pragma config(Servo, srvo_S1_C2_6, servo6, tServoStandard)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
//Servo Test
task main{
/*servo[servo3] = 100;
motor[motorC] = 10;
wait1Msec(1000);
motor[motorC] = 0;
wait1Msec(5000);
*/
servo[servo4] = 140;
wait1Msec(1000);
motor[motorA] = 30;
wait1Msec(2000);
motor[motorA] = 0;
wait1Msec(500);
servo[servo4] = 0;
wait1Msec(1000);
motor[motorA] = -20;
wait1Msec(1000);
}