Srdjan Veljkovic
/
AvnetATT_Pubnub
Avnet AT&T IoT Starter Kit demo for Pubnub
config_me.h@36:382cb978bddc, 2016-08-31 (annotated)
- Committer:
- sveljko
- Date:
- Wed Aug 31 18:04:30 2016 +0000
- Revision:
- 36:382cb978bddc
- Parent:
- 35:d0d86a2bcdb3
Fixed "gobbling" of the last character in received message (from the subscribe transaction);
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
JMF | 2:0e2ef866af95 | 1 | #ifndef __CONFIG_ME_H_ |
JMF | 2:0e2ef866af95 | 2 | #define __CONFIG_ME_H_ |
JMF | 2:0e2ef866af95 | 3 | |
JMF | 2:0e2ef866af95 | 4 | // User must set these for own context: |
fkellermavnet | 21:d0038d14ee7c | 5 | |
fkellermavnet | 21:d0038d14ee7c | 6 | // This is the server's base URL name. Example "www.google.com" |
stefanrousseau | 24:bd480d2aade4 | 7 | // Note that when you Fork a FLOW, it will typically assign either |
stefanrousseau | 24:bd480d2aade4 | 8 | // "run-east.att.io" or "run-west.att.io", so be sure to check this. |
sveljko | 35:d0d86a2bcdb3 | 9 | static const char * MY_SERVER_URL = "pubsub.pubnub.com"; |
stefanrousseau | 12:7c94ec5069dc | 10 | |
stefanrousseau | 24:bd480d2aade4 | 11 | // This identifier specifies with which FLOW device you are communicating. |
stefanrousseau | 24:bd480d2aade4 | 12 | // If you only have one devive there then you can just leave this as is. |
stefanrousseau | 24:bd480d2aade4 | 13 | // Once your FLOW device has been initialized (Virtual Device Initialize clicked), |
stefanrousseau | 24:bd480d2aade4 | 14 | // the Virtual Device will show up in M2X. This is its "DEVICE SERIAL" field |
fkellermavnet | 21:d0038d14ee7c | 15 | #define FLOW_DEVICE_NAME "vstarterkit001" |
fkellermavnet | 21:d0038d14ee7c | 16 | |
stefanrousseau | 24:bd480d2aade4 | 17 | // This constant defines how often sensors are read and sent up to FLOW |
stefanrousseau | 24:bd480d2aade4 | 18 | #define SENSOR_UPDATE_INTERVAL_MS 5000; //5 seconds |
stefanrousseau | 24:bd480d2aade4 | 19 | |
stefanrousseau | 24:bd480d2aade4 | 20 | // Specify here how many sensor parameters you want reported to FLOW. |
stefanrousseau | 24:bd480d2aade4 | 21 | // You can use only the temperature and humidity from the shield HTS221 |
stefanrousseau | 24:bd480d2aade4 | 22 | // or you can add the reading of the FXO8700CQ motion sensor on the FRDM-K64F board |
stefanrousseau | 24:bd480d2aade4 | 23 | // or if you have a SiLabs PMOD plugged into the shield, you can add its proximity sensor, |
stefanrousseau | 24:bd480d2aade4 | 24 | // UV light, visible ambient light and infrared ambient light readings |
stefanrousseau | 12:7c94ec5069dc | 25 | #define TEMP_HUMIDITY_ONLY 1 |
stefanrousseau | 12:7c94ec5069dc | 26 | #define TEMP_HUMIDITY_ACCELEROMETER 2 |
stefanrousseau | 12:7c94ec5069dc | 27 | #define TEMP_HUMIDITY_ACCELEROMETER_PMODSENSORS 3 |
stefanrousseau | 31:d7c386d2e95a | 28 | static int iSensorsToReport = TEMP_HUMIDITY_ONLY; //modify this to change your selection |
stefanrousseau | 12:7c94ec5069dc | 29 | |
fkellermavnet | 21:d0038d14ee7c | 30 | // This is the APN name for the cellular network, you will need to change this, check the instructions included with your SIM card kit: |
stefanrousseau | 12:7c94ec5069dc | 31 | static const char * MY_APN_STR = "m2m.com.attz"; |
fkellermavnet | 21:d0038d14ee7c | 32 | |
fkellermavnet | 21:d0038d14ee7c | 33 | //This is for normal HTTP. If you want to use TCP to a specific port, change that here: |
fkellermavnet | 21:d0038d14ee7c | 34 | static const char * MY_PORT_STR = "80"; |
JMF | 2:0e2ef866af95 | 35 | |
JMF | 2:0e2ef866af95 | 36 | #endif |