i2ctocan 2.0.0.0
|
I2cToCan Click example. More...
Macros | |
#define | I2CTOCAN_VAV_PRESS_DEV_ADDR 0x5C |
#define | I2CTOCAN_VAV_PRESS_CMD_START_PRESSURE_CONVERSION 0x21 |
#define | I2CTOCAN_VAV_PRESS_PRESS_SCALE_FACTOR 1200 |
#define | I2CTOCAN_VAV_PRESS_TEMP_SCALE_FACTOR 72 |
#define | I2CTOCAN_VAV_PRESS_READOUT_AT_KNOWN_TEMPERATURE 105 |
#define | I2CTOCAN_VAV_PRESS_KNOWN_TEMPERATURE_C 23.1 |
Functions | |
void | get_dif_press_and_temp (void) |
void | application_init (void) |
void | application_task (void) |
int | main (void) |
I2cToCan Click example.
This library contains API for the I2C to CAN click driver. This demo application shows an example of an I2C CAN click wired to the VAV Press click for reading differential pressure and temperature measurement.
The demo application is composed of two sections :
Initialization of I2C module and log UART. After driver initialization and default settings, the app set VAV Press click I2C slave address ( 0x5C ) and enable device.
This is an example that shows the use of an I2C to CAN click boardâ„¢. Logs pressure difference [ Pa ] and temperature [ degree Celsius ] values of the VAV Press click wired to the I2C to CAN click boardâ„¢.
Results are being sent to the Usart Terminal where you can track their changes.
#define I2CTOCAN_VAV_PRESS_CMD_START_PRESSURE_CONVERSION 0x21 |
#define I2CTOCAN_VAV_PRESS_DEV_ADDR 0x5C |
#define I2CTOCAN_VAV_PRESS_KNOWN_TEMPERATURE_C 23.1 |
#define I2CTOCAN_VAV_PRESS_PRESS_SCALE_FACTOR 1200 |
#define I2CTOCAN_VAV_PRESS_READOUT_AT_KNOWN_TEMPERATURE 105 |
#define I2CTOCAN_VAV_PRESS_TEMP_SCALE_FACTOR 72 |
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 | ) |
void get_dif_press_and_temp | ( | void | ) |
int main | ( | void | ) |