contain lorawan with serial_rx enabled
Dependencies: pulga-lorawan-drv SPI_MX25R Si1133 BME280
Diff: BMX160.txt
- Revision:
- 61:65744bc8ab55
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BMX160.txt Fri Jan 08 20:16:58 2021 +0000 @@ -0,0 +1,29 @@ +#include "mbed.h" + + +/* defines the axis for acc */ +#define ACC_NOOF_AXIS 3 +#define GYR_NOOF_AXIS 2 + +/* bmi160 slave address */ +#define BMI160_ADDR ((0x69)<<1) + +#define RAD_DEG 57.29577951 + + +I2C i2c(p13, p15); + + +/* buffer to store acc samples */ +int16_t acc_sample_buffer[ACC_NOOF_AXIS] = {0x5555, 0x5555, 0x5555}; +int16_t gyr_sample_buffer[GYR_NOOF_AXIS] = {0x5555, 0x5555}; + +double acc_result_buffer[ACC_NOOF_AXIS] = {0x5555, 0x5555, 0x5555}; +double gyr_result_buffer[GYR_NOOF_AXIS] = {0x5555, 0x5555}; + +double accel_ang_x, accel_ang_y; +double tiltx, tilty; +double tiltx_prev, tilty_prev; + +char i2c_reg_buffer[2] = {0}; + \ No newline at end of file