AT&T IoT hackster.io contest entry: Carpal2

Dependencies:   FXOS8700CQ Pubnub_mbed2_sync WNCInterface mbed-rtos mbed

Committer:
cswiger
Date:
Sat Dec 24 17:31:00 2016 +0000
Revision:
2:fe8e935b9342
Parent:
0:d2425a595807
added Ignition awareness so Carpal2 will resume working after car has been turned off and back on.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
cswiger 0:d2425a595807 1 /* ===================================================================
cswiger 0:d2425a595807 2 Copyright © 2016, AVNET Inc.
cswiger 0:d2425a595807 3
cswiger 0:d2425a595807 4 Licensed under the Apache License, Version 2.0 (the "License");
cswiger 0:d2425a595807 5 you may not use this file except in compliance with the License.
cswiger 0:d2425a595807 6 You may obtain a copy of the License at
cswiger 0:d2425a595807 7
cswiger 0:d2425a595807 8 http://www.apache.org/licenses/LICENSE-2.0
cswiger 0:d2425a595807 9
cswiger 0:d2425a595807 10 Unless required by applicable law or agreed to in writing,
cswiger 0:d2425a595807 11 software distributed under the License is distributed on an
cswiger 0:d2425a595807 12 "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
cswiger 0:d2425a595807 13 either express or implied. See the License for the specific
cswiger 0:d2425a595807 14 language governing permissions and limitations under the License.
cswiger 0:d2425a595807 15
cswiger 0:d2425a595807 16 ======================================================================== */
cswiger 0:d2425a595807 17
cswiger 0:d2425a595807 18 #ifndef __SENSORS_H_
cswiger 0:d2425a595807 19 #define __SENSORS_H_
cswiger 0:d2425a595807 20
cswiger 0:d2425a595807 21 // from config_me.h
cswiger 0:d2425a595807 22 #define TEMP_HUMIDITY_ACCELEROMETER 2
cswiger 0:d2425a595807 23 #define TEMP_HUMIDITY_ACCELEROMETER_GPS 3
cswiger 0:d2425a595807 24 static int iSensorsToReport = TEMP_HUMIDITY_ACCELEROMETER_GPS; //modify this to change your selection
cswiger 0:d2425a595807 25 #define SENSOR_UPDATE_INTERVAL_MS 30000; // 30 seconds
cswiger 0:d2425a595807 26 // end config_me.h
cswiger 0:d2425a595807 27
cswiger 0:d2425a595807 28 void sensors_init(void);
cswiger 0:d2425a595807 29 void read_sensors(void);
cswiger 0:d2425a595807 30 void ProcessUsbInterface(void);
cswiger 0:d2425a595807 31
cswiger 0:d2425a595807 32 #define SENSOR_FIELD_LEN_LIMIT 32
cswiger 0:d2425a595807 33 typedef struct
cswiger 0:d2425a595807 34 {
cswiger 0:d2425a595807 35 char Temperature[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 36 char Humidity[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 37 char AccelX[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 38 char AccelY[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 39 char AccelZ[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 40 char MagnetometerX[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 41 char MagnetometerY[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 42 char MagnetometerZ[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 43 char AmbientLightVis[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 44 char AmbientLightIr[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 45 char UVindex[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 46 char Proximity[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 47 char Temperature_Si7020[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 48 char Humidity_Si7020[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 49 char Virtual_Sensor1[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 50 char Virtual_Sensor2[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 51 char Virtual_Sensor3[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 52 char Virtual_Sensor4[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 53 char Virtual_Sensor5[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 54 char Virtual_Sensor6[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 55 char Virtual_Sensor7[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 56 char Virtual_Sensor8[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 57 char GPS_Satellites[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 58 char GPS_Latitude[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 59 char GPS_Longitude[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 60 char GPS_Altitude[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 61 char GPS_Speed[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 62 char GPS_Course[SENSOR_FIELD_LEN_LIMIT];
cswiger 0:d2425a595807 63 } K64F_Sensors_t ;
cswiger 0:d2425a595807 64
cswiger 0:d2425a595807 65 extern K64F_Sensors_t SENSOR_DATA;
cswiger 0:d2425a595807 66
cswiger 0:d2425a595807 67 #endif