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:
2:1ab4c19b99d4
Parent:
1:f2a5ea8ff543
Child:
6:3ee97b2c012c

File content as of revision 2:1ab4c19b99d4:

/*
* 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