Use accelerometer to interrupt.

Dependencies:   mbed SDFileSystem

Fork of shomberg_hw_7 by Russell Shomberg

sensors.h

Committer:
rshomberg
Date:
2018-11-16
Revision:
28:a59485b1626b
Child:
29:d33071ffaa5f

File content as of revision 28:a59485b1626b:

#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           p27
#define PIN_ACCEL_SCL           p28
#define PIN_ACCEL_INTERRUPT     p26

#define TRAANSIENT_RECORD_TIME  3 //seconds

int readSwitch(void);

float readTempSensor(void);

float mvToTemp(float sensorVoltage);

void recordTransient(void);

#endif