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

Committer:
Anubus
Date:
Sun Apr 02 12:28:21 2017 +0000
Revision:
0:bd276b1f1249
public version commit

Who changed what in which revision?

UserRevisionLine numberNew 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 Modified by Robert Bolling
Anubus 0:bd276b1f1249 17 January 2017
Anubus 0:bd276b1f1249 18 for the Mobile Life IoT project
Anubus 0:bd276b1f1249 19 - refactored the sensor list defines to fit project
Anubus 0:bd276b1f1249 20 =======================================================
Anubus 0:bd276b1f1249 21
Anubus 0:bd276b1f1249 22 ======================================================================== */
Anubus 0:bd276b1f1249 23
Anubus 0:bd276b1f1249 24
Anubus 0:bd276b1f1249 25 #ifndef __CONFIG_ME_H_
Anubus 0:bd276b1f1249 26 #define __CONFIG_ME_H_
Anubus 0:bd276b1f1249 27
Anubus 0:bd276b1f1249 28 // User must set these for own context:
Anubus 0:bd276b1f1249 29
Anubus 0:bd276b1f1249 30 #define BUF_SIZE_FOR_N_MAX_SOCKREAD (10)
Anubus 0:bd276b1f1249 31 #define MAX_WNC_SOCKREAD_PAYLOAD (1500)
Anubus 0:bd276b1f1249 32
Anubus 0:bd276b1f1249 33 // This is the server's base URL name. Example "www.google.com"
Anubus 0:bd276b1f1249 34 // Note that when you Fork a FLOW, it will typically assign either
Anubus 0:bd276b1f1249 35 // "run-east.att.io" or "run-west.att.io", so be sure to check this.
Anubus 0:bd276b1f1249 36 static const char * MY_SERVER_URL = "run-east.att.io";
Anubus 0:bd276b1f1249 37
Anubus 0:bd276b1f1249 38 // These are FLOW fields from the Endpoints tab:
Anubus 0:bd276b1f1249 39 #define FLOW_BASE_URL "/your_base_url_goes_here/in/flow"
Anubus 0:bd276b1f1249 40 #define FLOW_INPUT_NAME "/status"
Anubus 0:bd276b1f1249 41
Anubus 0:bd276b1f1249 42 // Unless you want to use a different protocol, this field should be left as is:
Anubus 0:bd276b1f1249 43 #define FLOW_URL_TYPE " HTTP/1.1\r\nHost: "
Anubus 0:bd276b1f1249 44
Anubus 0:bd276b1f1249 45 // This identifier specifies with which FLOW device you are communicating.
Anubus 0:bd276b1f1249 46 // If you only have one devive there then you can just leave this as is.
Anubus 0:bd276b1f1249 47 // Once your FLOW device has been initialized (Virtual Device Initialize clicked),
Anubus 0:bd276b1f1249 48 // the Virtual Device will show up in M2X. This is its "DEVICE SERIAL" field
Anubus 0:bd276b1f1249 49 #define FLOW_DEVICE_NAME "mobilelife001"
Anubus 0:bd276b1f1249 50
Anubus 0:bd276b1f1249 51 // This constant defines how often sensors are read and sent up to FLOW
Anubus 0:bd276b1f1249 52 #define SENSOR_UPDATE_INTERVAL_MS 30000; //30 seconds
Anubus 0:bd276b1f1249 53
Anubus 0:bd276b1f1249 54 // Specify here how many sensor parameters you want reported to FLOW.
Anubus 0:bd276b1f1249 55 // You can use only the temperature and humidity from the shield HTS221
Anubus 0:bd276b1f1249 56 // or you can add the reading of the FXO8700CQ motion sensor on the FRDM-K64F board
Anubus 0:bd276b1f1249 57 // or if you have a SiLabs PMOD plugged into the shield, you can add its proximity sensor,
Anubus 0:bd276b1f1249 58 // UV light, visible ambient light and infrared ambient light readings
Anubus 0:bd276b1f1249 59 // If you run the Windows "Sensor Simulator" utility, 8 additional virtual
Anubus 0:bd276b1f1249 60 // sensors can also be made available via USB.
Anubus 0:bd276b1f1249 61
Anubus 0:bd276b1f1249 62 #define SHIELDTEMP_ACCELEROMETER_BATTERY 1
Anubus 0:bd276b1f1249 63 #define SHIELDTEMP_ACCELEROMETER_BATTERY_INTRUSION 2
Anubus 0:bd276b1f1249 64 #define SHIELDTEMP_ACCELEROMETER_BATTERY_GPS 3
Anubus 0:bd276b1f1249 65 #define SHIELDTEMP_ACCELEROMETER_BATTERY_EXTERNALTEMP 4
Anubus 0:bd276b1f1249 66 #define SHIELDTEMP_ACCELEROMETER_BATTERY_EXTERNALTEMP_GPS 5
Anubus 0:bd276b1f1249 67 #define SHIELDTEMP_ACCELEROMETER_BATTERY_EXTERNALTEMP_GPS_INTRUSION 6
Anubus 0:bd276b1f1249 68 static int iSensorsToReport = SHIELDTEMP_ACCELEROMETER_BATTERY_EXTERNALTEMP_GPS_INTRUSION; //modify this to change your selection
Anubus 0:bd276b1f1249 69
Anubus 0:bd276b1f1249 70
Anubus 0:bd276b1f1249 71 // This is the APN name for the cellular network, you will need to change this, check the instructions included with your SIM card kit:
Anubus 0:bd276b1f1249 72 static const char * MY_APN_STR = "m2m.com.attz";
Anubus 0:bd276b1f1249 73
Anubus 0:bd276b1f1249 74 //This is for normal HTTP. If you want to use TCP to a specific port, change that here:
Anubus 0:bd276b1f1249 75 static const char * MY_PORT_STR = "80";
Anubus 0:bd276b1f1249 76
Anubus 0:bd276b1f1249 77 #endif