Typedefs | |
typedef enum btsense_revision_type | btsense_revision_t |
Enumerations | |
enum | btsense_revision_type { BTSENSE_REVISION_1_0, BTSENSE_REVISION_1_1, BTSENSE_REVISION_1_1A } |
Functions | |
void | btsense_init (btsense_revision_t rev) |
u_short | btsense_sample_light (void) |
u_char | btsense_sample_motion (void) |
int | btsense_sample_temp (char *temp) |
Variables | |
void(*) | btsense_sound (u_short) |
The revision number of the attached BTsense board.
BTSENSE_REVISION_1_0 | did never work | |
BTSENSE_REVISION_1_1 | beeper at PB4 = OC0 | |
BTSENSE_REVISION_1_1A | beeper at PB6 = OC3A |
void btsense_init | ( | btsense_revision_t | rev | ) |
Initialises the BTense library. This function has to be called before any other function of this library. Note that this function also enables the interrupt 6 (for the PIR) and installs an appropriate interrupt handler.
rev | The revision of the BTsense board. |
u_short btsense_sample_light | ( | void | ) |
Samples a value from the light sensor.
u_char btsense_sample_motion | ( | void | ) |
Samples a value from the light sensor.
int btsense_sample_temp | ( | char * | temp | ) |
Samples a value from the temperature sensor.
temp | [out] The current temperature. |
void(*) btsense_sound(u_short) |
Outputs a sound on the beeper.
freq | The frequency in Hz to output. Use 0 to turn off the beeper. |