MQTT demo program for Nucleo F401RE and Seeedstudio W5200 Ethernet Shield which is based on Wiznet IBMIoTClientEthernetExample_W5500.
Dependencies: MQTT W5200Interface mbed DHT11
Fork of IBMIoTClientEthernetExample_W5500 by
I post description regarding this source code here.
http://developer.mbed.org/users/hillkim7/notebook/ibmiotclientethernetexample_w5200/
Diff: main.cpp
- Revision:
- 2:87c816cd88e2
- Parent:
- 1:532d83b9f910
- Child:
- 3:64a7d39e423b
--- a/main.cpp Mon Sep 29 04:57:17 2014 +0000 +++ b/main.cpp Mon Sep 29 05:06:13 2014 +0000 @@ -162,11 +162,14 @@ int main() { #if defined(TARGET_KL25Z) - SPI spi(D11, D12, D13); // mosi, miso, sclk - wait(1); + Serial pc(USBTX, USBRX); + pc.baud(115200); + + SPI spi(D11, D12, D13); // mosi, miso, sclk + wait(1); - MQTTEthernet ipstack(&spi, D10, D9); //scs(D10), nRESET(PTA20) - MQTT::Client<MQTTEthernet, Countdown, MQTT_MAX_PACKET_SIZE> client(ipstack); + MQTTEthernet ipstack(&spi, D10, D9); //scs(D10), nRESET(PTA20) + MQTT::Client<MQTTEthernet, Countdown, MQTT_MAX_PACKET_SIZE> client(ipstack); #endif getMac(ipstack.getEth(), id, sizeof(id));