Use accelerometer to interrupt.
Dependencies: mbed SDFileSystem
Fork of shomberg_hw_7 by
sensors.h
- Committer:
- rshomberg
- Date:
- 2018-11-18
- Revision:
- 29:d33071ffaa5f
- Parent:
- 28:a59485b1626b
File content as of revision 29:d33071ffaa5f:
#ifndef SENSORS_H #define SENSORS_H #include "mbed.h" #include "MMA8452Q.h" // Modifiable Variables #define VREF 3.3 #define TEMP_CALIBRATION_A 0.1 #define TEMP_CALIBRATION_B -50 // Pin Configuration #define PIN_SWITCH p9 #define PIN_TEMP_SENSOR p20 // Pin Configuration Accel #define PIN_ACCEL_SDA p28 #define PIN_ACCEL_SCL p27 #define PIN_ACCEL_INTERRUPT p14 #define TRAANSIENT_RECORD_TIME 3 //seconds int readSwitch(void); float readTempSensor(void); float mvToTemp(float sensorVoltage); void recordTransient(void); #endif