39 #define SRF08_UNIT_0 0xE0
40 #define SRF08_UNIT_1 0xE2
41 #define SRF08_UNIT_2 0xE4
42 #define SRF08_UNIT_3 0xE6
43 #define SRF08_UNIT_4 0xE8
44 #define SRF08_UNIT_5 0xEA
45 #define SRF08_UNIT_6 0xEC
46 #define SRF08_UNIT_7 0xEE
47 #define SRF08_UNIT_8 0xF0
48 #define SRF08_UNIT_9 0xF2
49 #define SRF08_UNIT_10 0xF4
50 #define SRF08_UNIT_11 0xF6
51 #define SRF08_UNIT_12 0xF8
52 #define SRF08_UNIT_13 0xFA
53 #define SRF08_UNIT_14 0xFC
54 #define SRF08_UNIT_15 0xFE
60 #define SRF08_I2C_BROADCAST_ADDRESS 0X00
62 #define SRF08_MIN_GAIN 0
63 #define SRF08_MAX_GAIN 31
64 #define SRF08_MIN_RANGE 0
65 #define SRF08_MAX_RANGE 11008
67 #define SRF08_INCHES 0X50
68 #define SRF08_CENTIMETERS 0X51
69 #define SRF08_MICROSECONDS 0X52
72 #define SRF08_COMMAND 0
73 #define SRF08_SET_GAIN 1
75 #define SRF08_ECHO_1 2
76 #define SRF08_ECHO_2 4
77 #define SRF08_ECHO_3 6
78 #define SRF08_ECHO_4 8
79 #define SRF08_ECHO_5 10
80 #define SRF08_ECHO_6 12
81 #define SRF08_ECHO_7 14
82 #define SRF08_ECHO_8 16
83 #define SRF08_ECHO_9 18
84 #define SRF08_ECHO_10 20
85 #define SRF08_ECHO_11 22
86 #define SRF08_ECHO_12 24
87 #define SRF08_ECHO_13 26
88 #define SRF08_ECHO_14 28
89 #define SRF08_ECHO_15 30
90 #define SRF08_ECHO_16 32
91 #define SRF08_ECHO_17 34
void srf08_set_gain(uint8_t gain)
void srf08_receive(void)
Ask the value to the device.
void srf08_set_range(uint32_t millimeters)
uint32_t srf08_read_register(uint8_t srf08_register)
void srf08_select_unit(uint8_t srf08_address)
void srf08_change_i2c_address(uint8_t new_i2c_address)
void srf08_copy(void)
Copy the I2C buffer.
void srf08_read(void)
Read values on the bus.
void srf08_initiate_ranging(void)