Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed Servo X_NUCLEO_IKS01A2 X_NUCLEO_IDW01M1v2 NetworkSocketAPI NDefLib MQTT
Revision 21:78fac4c1b0fa, committed 2016-10-19
- Comitter:
- mapellil
- Date:
- Wed Oct 19 09:36:51 2016 +0000
- Parent:
- 20:517b559ce91d
- Child:
- 22:d278e4bb5ded
- Commit message:
- fixed "publish" string syntax, changed type name to iotsample-mbed-Nucleo
Changed in this revision
| main.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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;