-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmotor encoder test.c
22 lines (20 loc) · 1.14 KB
/
motor encoder test.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#pragma config(Hubs, S1, HTMotor, HTServo, none, none)
#pragma config(Motor, motorA, A, tmotorNormal, PIDControl, encoder)
#pragma config(Motor, motorB, B, tmotorNormal, PIDControl, encoder)
#pragma config(Motor, motorC, C, tmotorNormal, PIDControl, encoder)
#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, tServoNone)
#pragma config(Servo, srvo_S1_C2_2, servo2, tServoNone)
#pragma config(Servo, srvo_S1_C2_3, servo3, tServoNone)
#pragma config(Servo, srvo_S1_C2_4, servo4, tServoNone)
#pragma config(Servo, srvo_S1_C2_5, servo5, tServoNone)
#pragma config(Servo, srvo_S1_C2_6, servo6, tServoNone)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
task main()
{
nMotorEncoder[motorA] = 0;
nMotorEncoderTarget[motorA] = 90;
motor[motorA] = 50;
wait1Msec(10000);
}