Teste Flash
Dependencies: pulga-lorawan-drv Si1133 BME280
BMX160.txt
- Committer:
- MatteusCarr
- Date:
- 2021-09-13
- Revision:
- 70:99b7a15c09da
- Parent:
- 61:65744bc8ab55
File content as of revision 70:99b7a15c09da:
#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};