989
Dependencies: mbed Servo X_NUCLEO_IKS01A2 X_NUCLEO_IDW01M1v2 NetworkSocketAPI NDefLib MQTT
Diff: main.cpp
- Revision:
- 21:78fac4c1b0fa
- Parent:
- 20:517b559ce91d
- Child:
- 22:d278e4bb5ded
--- a/main.cpp Mon Oct 17 15:47:36 2016 +0000 +++ b/main.cpp Wed Oct 19 09:36:51 2016 +0000 @@ -41,8 +41,7 @@ #define ORG "quickstart" // connect to quickstart.internetofthings.ibmcloud.com/ For a registered connection, replace with your org #define ID "" #define AUTH_TOKEN "" -#define DEFAULT_TYPE_NAME "iotsample-mbed-NucleoF401RE" - +#define DEFAULT_TYPE_NAME "iotsample-mbed-Nucleo" #else #define ORG "play" // connect to play.internetofthings.ibmcloud.com/ For a registered connection, replace with your org #define ID "testnucleo2" // For a registered connection, replace with your id @@ -55,8 +54,8 @@ #define MQTT_TLS_PORT 8883 #define IBM_IOT_PORT MQTT_PORT // WiFi network credential -#define SSID "" // Network must be visible otherwise it can't connect -#define PASSW "" +#define SSID "crespan" // Network must be visible otherwise it can't connect +#define PASSW "Elfrontal1" #warning "Wifi SSID & password empty" char id[30] = ID; // mac without colons @@ -181,7 +180,7 @@ pressure_sensor->GetPressure(&press); humidity_sensor->GetHumidity(&hum); sprintf(buf, - "{\"d\":{\"ST\":\"Nucleo-IoT-mbed\",\"Temp\":%0.4f,\"Pressure\":\"%0.4f,\",\"Humidity\":%0.4f}}", + "{\"d\":{\"ST\":\"Nucleo-IoT-mbed\",\"Temp\":%0.4f,\"Pressure\":%0.4f,\"Humidity\":%0.4f}}", temp, press, hum); message.qos = MQTT::QOS0; message.retained = false;