-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTest_KickstandArm.c
More file actions
56 lines (50 loc) · 2.26 KB
/
Copy pathTest_KickstandArm.c
File metadata and controls
56 lines (50 loc) · 2.26 KB
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
#pragma config(Hubs, S1, HTMotor, HTMotor, HTServo, HTMotor)
#pragma config(Sensor, S1, , sensorI2CMuxController)
#pragma config(Sensor, S2, gyro, sensorI2CCustom)
#pragma config(Sensor, S3, USback, sensorSONAR)
#pragma config(Sensor, S4, HTSMUX, sensorI2CCustom)
#pragma config(Motor, motorA, arm, tmotorNXT, openLoop, encoder)
#pragma config(Motor, motorB, , tmotorNXT, openLoop, encoder)
#pragma config(Motor, motorC, , tmotorNXT, openLoop, encoder)
#pragma config(Motor, mtr_S1_C1_1, FrontRight, tmotorTetrix, PIDControl, encoder)
#pragma config(Motor, mtr_S1_C1_2, BackRight, tmotorTetrix, PIDControl, reversed, encoder)
#pragma config(Motor, mtr_S1_C2_1, Flipper, tmotorTetrix, openLoop)
#pragma config(Motor, mtr_S1_C2_2, Lift, tmotorTetrix, openLoop, encoder)
#pragma config(Motor, mtr_S1_C4_1, BackLeft, tmotorTetrix, PIDControl, encoder)
#pragma config(Motor, mtr_S1_C4_2, FrontLeft, tmotorTetrix, PIDControl, reversed, encoder)
#pragma config(Servo, srvo_S1_C3_1, grabber, tServoStandard)
#pragma config(Servo, srvo_S1_C3_2, hood, tServoStandard)
#pragma config(Servo, srvo_S1_C3_3, USbackservo, tServoStandard)
#pragma config(Servo, srvo_S1_C3_4, USfrontservo, tServoStandard)
#pragma config(Servo, srvo_S1_C3_5, trigger, tServoStandard)
#pragma config(Servo, srvo_S1_C3_6, servo6, tServoNone)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
//version 2/11/15 Status: different function = different task
#include "JoystickDriver.c"
#include "include\hitechnic-irseeker-v2.h"
#include "include\hitechnic-sensormux.h"
#include "include\lego-touch.h"
#include "include\lego-ultrasound.h"
#include "include\hitechnic-gyro.h"
//const tMUXSensor TOUCHFront = msensor_S4_3;
//const tMUXSensor TOUCHBack = msensor_S4_4;
void armOut(){
time1[T3]=0;
while((float)time1[T3]<2000){
motor[arm] = -50;
}
motor[arm] = 0;
}
void armIn(){
time1[T3]=0;
while((float)time1[T3] < 2000){
motor[arm] = 50;
}
motor[arm] = 0;
}
task main()
{
armOut();
wait1Msec(3000);
armIn();
}