-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHeader.h
32 lines (25 loc) · 1.05 KB
/
Header.h
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
#pragma config(Sensor, S1, gyro, sensorEV3_Gyro, modeEV3Gyro_RateAndAngle)
#pragma config(Sensor, S2, rightSonar, sensorEV3_Ultrasonic)
#pragma config(Sensor, S3, HTCS2, sensorI2CCustom)
#pragma config(Sensor, S4, leftSonar, sensorEV3_Ultrasonic)
#pragma config(Motor, motorA, right, tmotorEV3_Large, PIDControl, encoder)
#pragma config(Motor, motorC, left, tmotorEV3_Large, PIDControl, encoder)
//*!!Code automatically generated by 'ROBOTC' configuration wizard !!*//
#include "HitechnicColorSensor.h"
#define FINDINGLINE 0
#define FOLLOWLINE 1
#define AVOIDLINE 2
#define OBSERVELINE 3
int currentState = FINDINGLINE;
bool whiteToBlackCheck = false;
bool objectAvoided = false;
bool startObserve = false;
long currentColour, r, g, b;
const int fasterSpeed = 20;
const int lowerSpeed = 3;
int leftMotorSpeedFind;
int rightMotorSpeedFind;
int leftMotorSpeedFollow;
int rightMotorSpeedFollow;
int leftMotorSpeedAvoid;
int rightMotorSpeedAvoid;