-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmovement.h
48 lines (41 loc) · 1.01 KB
/
movement.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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* @author Aryan Joshi and Conner Makoben
*@date 9/11/19
*
*
*/
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include <stdlib.h>
#include <math.h>
/**
* Detects the tape on the ground for boundaries.
*/
int detect_tape(oi_t *sensor);
/**
* Detects where a cliff is, and avoids it.
*/
int detect_cliff(oi_t *sensor);
/**
* Detects when a object is bumped.
*/
int detect_bumper(oi_t *sensor);
/**
* move forward a certain amount of centimeters. If an object
* is hit with the left or right bumper, stop the wheels and return
* the current distance moved. Otherwise return the total distance moved.
*/
int move_forward(oi_t *sensor, double centimeters);
/**
* Turns the block clockwise a certain degrees.
*/
void turn_clockwise(oi_t *sensor, double degrees);
/**
* Turns the block counter clockwise a certain degrees.
*/
void turn_counter_clockwise(oi_t *sensor, double degrees);
/**
* Moves the bot backwards by a certain amount of centimeters.
*/
void move_backward(oi_t *sensor, double centimeters);