-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathIRSeekerV2Test.c
executable file
·55 lines (45 loc) · 1.9 KB
/
IRSeekerV2Test.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
#pragma config(Hubs, S1, HTServo, HTMotor, HTMotor, HTMotor)
#pragma config(Sensor, S2, HTIRS2, sensorI2CCustom)
#pragma config(Sensor, S3, HTGYRO, sensorAnalogInactive)
#pragma config(Motor, motorA, green, tmotorNormal, openLoop)
#pragma config(Motor, motorB, yellow, tmotorNormal, openLoop)
#pragma config(Motor, motorC, red, tmotorNormal, openLoop)
#pragma config(Motor, mtr_S1_C2_1, ballArm, tmotorNormal, openLoop, reversed)
#pragma config(Motor, mtr_S1_C2_2, clawArm, tmotorNormal, openLoop)
#pragma config(Motor, mtr_S1_C3_1, intake, tmotorNormal, openLoop)
#pragma config(Motor, mtr_S1_C3_2, spool, tmotorNormal, openLoop, reversed)
#pragma config(Motor, mtr_S1_C4_1, right, tmotorNormal, openLoop, reversed)
#pragma config(Motor, mtr_S1_C4_2, left, tmotorNormal, openLoop, encoder)
#pragma config(Servo, srvo_S1_C1_1, clawRelease, tServoStandard)
#pragma config(Servo, srvo_S1_C1_2, armRelease, tServoStandard)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
//#pragma config(Sensor, S2, HTGYRO, sensorI2CCustom)
//#pragma config(Sensor, S2, HTGYRO, sensorAnalogInactive)
//#pragma config(Sensor, S2, HTGYRO, sensorLowSpeed)
/* $Id$ */
#define IR_SEEKER
#include "Autonomous.h"
#include "JoystickDriver.c" //Include file to "handle" the Bluetooth messages.
/**
* Do nothing.
*/
task main()
{
initializeRobot();
// Wait for the beginning of autonomous phase.
//waitForStart();
wait1Msec(1000);
StartTask(prettyLights);
/*
while(true)
{
getIRDirection();
wait1Msec(100);
}
*/
while(true)
{
turnToIRBeacon(MOTOR_FULL);
wait1Msec(1000);
}
}