YUFEI JIANG / Mbed 2 deprecated CSSE4011_BLE_IMU

Dependencies:   BLE_API_Tiny_BLE MPU6050-DMP-Seeed-Tiny-BLE mbed

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers tiny_ble.h Source File

tiny_ble.h

00001 
00002 #ifndef __TINY_BLE_H__
00003 #define __TINY_BLE_H__
00004 #define LED_GREEN   p21
00005 #define LED_RED     p22
00006 #define LED_BLUE    p23
00007 #define BUTTON_PIN  p17
00008 #define BATTERY_PIN p1
00009 
00010 #define MPU6050_SDA p12
00011 #define MPU6050_SCL p13
00012 
00013 #define UART_TX     p9
00014 #define UART_RX     p11
00015 #define UART_CTS    p8
00016 #define UART_RTS    p10
00017 
00018 
00019 #ifndef M_PI
00020 #define M_PI           3.14159265358979323846
00021 #endif
00022 #ifndef round
00023 #define round(var)    (int)(var+0.5f)
00024 #endif
00025 
00026 #define DEFAULT_MPU_HZ  (200)
00027 
00028 // FIFO rate = 200Hz / (1 + this value)
00029 // For example, 0x01 is 100Hz, 0x03 is 50Hz.
00030 // 0x00 to 0x09
00031 #define IMU_FIFO_RATE_DIVIDER 0x09
00032 
00033 // Sample rate = 1kHz / (1 + this valye)
00034 // For example, 4 is 200Hz.
00035 #define IMU_SAMPLE_RATE_DIVIDER 4
00036 
00037 // measuring range of gyroscope (±n deg/s)
00038 // But other value doesn't yet support.
00039 #define MPU6050_GYRO_FS MPU6050_GYRO_FS_2000
00040 
00041 // measuring range of acceleration sensor (±n g)
00042 // But other value doesn't yet support.
00043 #define MPU6050_ACCEL_FS MPU6050_ACCEL_FS_2
00044 
00045 #define PC_BAUDRATE 921600
00046 #endif // __TINY_BLE_H__
00047