forked from stevenBowtie/ChairBot
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChairBot.h
More file actions
40 lines (34 loc) · 761 Bytes
/
Copy pathChairBot.h
File metadata and controls
40 lines (34 loc) · 761 Bytes
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
#ifndef ChairBot_h
#define ChairBot_h
#include "Arduino.h"
#include "compass.h"
class ChairBot{
public:
long heading;
int leftSpeed;
int rightSpeed;
int MAX_SPEED;
int left_sonar;
int right_sonar;
int pulse_start;
int pulse_stop;
int pulse_toggle;
ChairBot();
void begin();
void drive(int left, int right);
/*
void forward(int forwardSpeed);
void backward(int backwardSpeed);
void turnLeft(int degrees);
void turnRight(int degrees);
void spinLeft(int degrees);
void spinRight(int degrees);
*/
int get_heading();
void turn(int degrees);
void turn_to_heading(int degrees);
unsigned int distance_left();
unsigned int distance_center();
unsigned int distance_right();
};
#endif //ChairBot_H