root / scout_avr / src / cliffSensor.h @ 18db4dfa
History | View | Annotate | Download (439 Bytes)
1 |
#ifndef _CLIFFSENSOR_H_
|
---|---|
2 |
#define _CLIFFSENSOR_H_
|
3 |
|
4 |
#include <avr/io.h> |
5 |
#include <avr/interrupt.h> |
6 |
|
7 |
void cliffSensor_init(void); |
8 |
bool read_cliffSensor_front(void); |
9 |
bool read_cliffSensor_left(void); |
10 |
bool read_cliffSensor_right(void); |
11 |
|
12 |
/* The returned result is in the form of left_front_right;
|
13 |
* For example, if both left and front sensors detect a cliff,
|
14 |
* the returned value is 0b110 */
|
15 |
unsigned char read_cliffSensor_all(void); |
16 |
|
17 |
#endif
|