Roomba Tank
CSC 460 Project 3
roomba.h
Go to the documentation of this file.
1 #ifndef ROOMBA_H_
2 #define ROOMBA_H_
3 
4 #ifndef XPLAINED
5 //#error "Roomba.h can only be used with the Xplained board"
6 #endif
7 
8 #include <stdint.h>
9 
10 
14 #define START 128
15 #define CONTROL_MODE 130
16 #define SAFE_MODE 131
17 #define FULL_MODE 132
18 #define POWER 133
19 #define DRIVE 137
20 #define SONG 140
21 #define PLAY 141
22 #define SENSORS 142
23 #define QUERYLIST 149
24 
28 #define SENSOR_ALL_DATA 0
29 #define SENSOR_SUB_1 1
30 #define SENSOR_SUB_2 2
31 #define SENSOR_SUB_3 3
32 
36 #define ROOMBA_SPEED 250
37 #define ROOMBA_TURN 150
38 #define TURN_RADIUS 400
39 #define AUTOTURN_RADIUS 350
40 #define DRIVE_STRAIGHT 32768
41 #define IN_PLACE_CW -1
42 #define IN_PLACE_CCW 1
43 
47 void Roomba_Init(void);
48 
52 void Roomba_Drive(int16_t velocity, int16_t radius);
53 
57 void Roomba_Play(uint8_t song);
58 
62 void Roomba_Sensors(uint8_t packet_id);
63 
67 void Roomba_QueryList(uint8_t packet1, uint8_t packet2);
68 
72 void Roomba_Song(uint8_t n);
73 
74 #endif /* ROOMBA_H_ */
void Roomba_Drive(int16_t velocity, int16_t radius)
Definition: roomba.c:50
void Roomba_Song(uint8_t n)
Definition: roomba.c:87
void Roomba_QueryList(uint8_t packet1, uint8_t packet2)
Definition: roomba.c:77
void Roomba_Sensors(uint8_t packet_id)
Definition: roomba.c:69
void Roomba_Init(void)
Definition: roomba.c:13
void Roomba_Play(uint8_t song)
Definition: roomba.c:61