smoke2 2.0.0.0
|
Smoke2 Click example. More...
Macros | |
#define | EXAMPLE_MODE_SMOKE 0 |
#define | EXAMPLE_MODE_PROXIMITY 1 |
#define | EXAMPLE_MODE EXAMPLE_MODE_SMOKE |
Functions | |
void | smoke_example (smoke2_t *ctx) |
Smoke 2 Smoke example. | |
void | proximity_example (void) |
Smoke 2 Proximity example. | |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
Smoke2 Click example.
This example is made to see how Smoke 2 clicks work. The purpose of this example is that, depending on the way we choose, it collects data from the external environment about smoke, processes it, and prints it via the UART terminal.
The demo application is composed of two sections :
Initialization of communication modules, additional pins, Mapping pins and configures device for measurement.
Example shows module working depending on example mode. We can choose between: EXAMPLE_MODE_PROXIMITY and EXAMPLE_MODE_SMOKE.
Additional Functions :
#define EXAMPLE_MODE EXAMPLE_MODE_SMOKE |
#define EXAMPLE_MODE_PROXIMITY 1 |
#define EXAMPLE_MODE_SMOKE 0 |
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 | ) |
void proximity_example | ( | void | ) |
Smoke 2 Proximity example.
This function reads sensor data and logs it.
void smoke_example | ( | smoke2_t * | ctx | ) |
Smoke 2 Smoke example.
This function checks if sensor data is gone over thershold set.