Simple demo with GPIO MQTT protocol test on STM32 broker tests.mosquitto.org WIFI interface ESP8266 Issue of topic0 by pressing the button If reception of ', switching of the led If received from 'q' end of program
Diff: main.cpp
- Revision:
- 25:bfdd064b9d99
- Parent:
- 24:cc01ff2c2603
--- a/main.cpp Thu Jun 11 14:09:40 2020 +0000 +++ b/main.cpp Fri Jun 12 14:42:35 2020 +0000 @@ -32,8 +32,10 @@ #include "MQTTmbed.h" #include "MQTTClient.h" -DigitalOut led(LED1); +DigitalOut led(LED1); // LED verte (user) Serial pc(USBTX, USBRX); +//DigitalIn btn(USER_BUTTON); //PC13 sur F411 +DigitalIn btn(PA_8,PullUp); // button connected with internal pullup #define board "NUCLEO_F411RE" /* @@ -56,9 +58,6 @@ */ #define dupli false -//DigitalIn btn(USER_BUTTON); //PC13 sur F411 -DigitalIn btn(PA_8,PullUp); // button connected with internal pullup - const char* hostname = "test.mosquitto.org"; const int port = 1883; char* ID ="mbedSTM32Fourcade";