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: watersenor_and_temp_code MQTT NetworkSocketAPI X_NUCLEO_IDW01M1v2 mbed
Diff: main.cpp
- Revision:
- 2:eab5b5c8271d
- Parent:
- 1:2ee9e5685a1e
- Child:
- 3:30d9b8d9adc9
--- a/main.cpp Tue Oct 31 23:56:09 2017 +0800
+++ b/main.cpp Thu Nov 02 04:38:10 2017 +0000
@@ -9,16 +9,16 @@
#define MQTT_MAX_PACKET_SIZE 250
#define MQTT_MAX_PAYLOAD_SIZE 300
//Configuration value needed to connect Red-node
-#define BROKER_URL "192.168.0.10";
+#define BROKER_URL "192.168.20.149";
#define MQTT_PORT 1883
//MQTT use Topic
-#define TOPIC "temp"
+#define TOPIC "1"
#define SUB_TOPIC "LED"
//Wifi network
-#define SSID "megu megu fire"
-#define PASSW "66666667"
+#define SSID "tnta"
+#define PASSW "tnta2355818"
DigitalOut myled(LED1);
BME280 bmpSensor;
@@ -143,7 +143,7 @@
MQTT::Message message;
- int data = bmpSensor.Temp_read();
+ int data = 1;
char *pubTopic = TOPIC;
char buf[MQTT_MAX_PAYLOAD_SIZE];
@@ -201,6 +201,4 @@
// printf ("tyeld: %d\n\r",tyeld.read_ms()-start);
}
-
- return 0;
}
\ No newline at end of file