speedsense 2.1.0.0
|
Speed Sense Click Example. More...
Macros | |
#define | SPEEDSENSE_MAG_POLE_PAIRS 3 |
#define | SPEEDSENSE_CALC_RMP SPEEDSENSE_CNV_MIN_TO_MS / SPEEDSENSE_MAG_POLE_PAIRS |
Functions | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
Variables | |
uint8_t | start_measure = SPEEDSENSE_STOP_MEASURE |
uint32_t | time_cnt = 0 |
uint32_t | signal_duration = 0 |
uint32_t | start_timer = 0 |
Speed Sense Click Example.
This library contains the API for the Speed Sense Click driver for the speed and direction signal state detection for every magnetic pole pair.
The demo application is composed of two sections :
Initialization of GPIO and log UART.
This example demonstrates the use of the Speed Sense Click board. The demo application displays the direction of movement and rotation speed (rotations per minute) of the ring magnet with three pairs of rotating poles positioned in the sensor operating range.
#define SPEEDSENSE_CALC_RMP SPEEDSENSE_CNV_MIN_TO_MS / SPEEDSENSE_MAG_POLE_PAIRS |
#define SPEEDSENSE_MAG_POLE_PAIRS 3 |
void application_init | ( | void | ) |
< Logger config object.
< Click config object.
Logger initialization. Default baud rate: 115200 Default log level: LOG_LEVEL_DEBUG
void application_task | ( | void | ) |
int main | ( | void | ) |
uint32_t signal_duration = 0 |
uint8_t start_measure = SPEEDSENSE_STOP_MEASURE |
uint32_t start_timer = 0 |
uint32_t time_cnt = 0 |