Mobile Life IoT project using the AT&T IoT Starter Kit Software and files for my device to monitor the status or our Airstream travel trailer RV. A full description of the project is at Hackster.IO here as part of the Realtime AT&T IoT Starter Kit Challenge: https://www.hackster.io/Anubus/mobile-life-iot-9c10be
Dependencies: FXOS8700CQ MODSERIAL mbed
sensors.h@0:bd276b1f1249, 2017-04-02 (annotated)
- Committer:
- Anubus
- Date:
- Sun Apr 02 12:28:21 2017 +0000
- Revision:
- 0:bd276b1f1249
public version commit
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Anubus | 0:bd276b1f1249 | 1 | /* =================================================================== |
Anubus | 0:bd276b1f1249 | 2 | Copyright © 2016, AVNET Inc. |
Anubus | 0:bd276b1f1249 | 3 | |
Anubus | 0:bd276b1f1249 | 4 | Licensed under the Apache License, Version 2.0 (the "License"); |
Anubus | 0:bd276b1f1249 | 5 | you may not use this file except in compliance with the License. |
Anubus | 0:bd276b1f1249 | 6 | You may obtain a copy of the License at |
Anubus | 0:bd276b1f1249 | 7 | |
Anubus | 0:bd276b1f1249 | 8 | http://www.apache.org/licenses/LICENSE-2.0 |
Anubus | 0:bd276b1f1249 | 9 | |
Anubus | 0:bd276b1f1249 | 10 | Unless required by applicable law or agreed to in writing, |
Anubus | 0:bd276b1f1249 | 11 | software distributed under the License is distributed on an |
Anubus | 0:bd276b1f1249 | 12 | "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, |
Anubus | 0:bd276b1f1249 | 13 | either express or implied. See the License for the specific |
Anubus | 0:bd276b1f1249 | 14 | language governing permissions and limitations under the License. |
Anubus | 0:bd276b1f1249 | 15 | |
Anubus | 0:bd276b1f1249 | 16 | ======================================================================== */ |
Anubus | 0:bd276b1f1249 | 17 | |
Anubus | 0:bd276b1f1249 | 18 | #ifndef __SENSORS_H_ |
Anubus | 0:bd276b1f1249 | 19 | #define __SENSORS_H_ |
Anubus | 0:bd276b1f1249 | 20 | |
Anubus | 0:bd276b1f1249 | 21 | void sensors_init(void); |
Anubus | 0:bd276b1f1249 | 22 | void read_sensors(void); |
Anubus | 0:bd276b1f1249 | 23 | |
Anubus | 0:bd276b1f1249 | 24 | #define CTOF(x) ((x)*1.8+32) |
Anubus | 0:bd276b1f1249 | 25 | |
Anubus | 0:bd276b1f1249 | 26 | #define SENSOR_FIELD_LEN_LIMIT 32 |
Anubus | 0:bd276b1f1249 | 27 | typedef struct |
Anubus | 0:bd276b1f1249 | 28 | { |
Anubus | 0:bd276b1f1249 | 29 | char Temperature[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 30 | char Humidity[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 31 | char AccelX[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 32 | char AccelY[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 33 | char AccelZ[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 34 | char MagnetometerX[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 35 | char MagnetometerY[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 36 | char MagnetometerZ[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 37 | char Temperature_Si7020[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 38 | char Humidity_Si7020[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 39 | char GPS_Satellites[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 40 | char GPS_Latitude[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 41 | char GPS_Longitude[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 42 | char GPS_Altitude[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 43 | char GPS_Speed[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 44 | char GPS_Course[SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 45 | char Battery_Voltage [SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 46 | char Intrusion_Detected [SENSOR_FIELD_LEN_LIMIT]; |
Anubus | 0:bd276b1f1249 | 47 | } K64F_Sensors_t ; |
Anubus | 0:bd276b1f1249 | 48 | |
Anubus | 0:bd276b1f1249 | 49 | extern K64F_Sensors_t SENSOR_DATA; |
Anubus | 0:bd276b1f1249 | 50 | |
Anubus | 0:bd276b1f1249 | 51 | #endif |