![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
Use a touchscreen display to select which sensor measurement to display
Dependencies: mbed DisplayModule24_demo_day10
acc.h
- Committer:
- ldelaney17
- Date:
- 2017-01-17
- Revision:
- 8:a7b7edb66de5
- Parent:
- 6:3ee97b2c012c
File content as of revision 8:a7b7edb66de5:
/* * Accelerometer header file * initializes accelerometer to collect sensor data * includes a function to return the magnitude of the acceleration */ #ifndef ACC_H #define ACC_H #include "mbed.h" extern I2C connection; extern Serial pc; const int addr_acc = 0x53 << 1; void acc_init(); //gets a single magnitude reading. Prints the acceleration data if DEBUG_MODE is defined float get_acc_magnitude(); // averages n magnitude readings. Will make no readings and retrun for 0 and negative values of n float get_avg_mag(int n =5); #endif