MQQT on Industruino
Arduino UNO supports MQQT so I was hoping this one did too. I have an upcoming project in which I would like to implement the same using this device. Any helps would be much appreciated. Has anyone successfully implemented an MQQT IOT project in this platform?
Hi, Industruino does MQTT with standard Arduino libraries, you can find a working example over Ethernet at https://industruino.com/blog/our-news-1/post/industruino-mqtt-client-over-ethernet-35
I am using it in production and it works exceptionally well. I am also using the new ethernet library that auto detects the type of eternet module as it has some extended functions to check if the ethernet cable is plugged in and if the hardware is present. It also reports remote IP address you are connected to as well as the port.
You MUST edit the w5100.h (in your arduino system libraries folder) source file and change the following
Comment out line #define SPI_ETHERNET_SETTINGS SPISettings(14000000, MSBFIRST, SPI_MODE0)
edit the line #define SPI_ETHERNET_SETTINGS SPISettings(8000000, MSBFIRST, SPI_MODE0) and change 8000000 to 4000000
save the file and compile again. I used Arduino IDE 1.8.7 and the ethernet library WebClientRepeating sample to test the ethernet functions (it uses the new functions) - add the following just after the includes to make the USB serial connection work easily
// serial output steam
#if defined(ARDUINO_SAMD_ZERO) || __SAMD21G18A__ && defined(SERIAL_PORT_USBVIRTUAL)
#define Serial SERIAL_PORT_USBVIRTUAL
#endif
This way you can use Serial.print etc as normal.
Your answer
Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!
Keep Informed
About This Forum
This community is for professionals and enthusiasts of our products and services.
Read GuidelinesQuestion tools
Stats
Asked: 11/18/18, 5:44 PM |
Seen: 2560 times |
Last updated: 12/3/18, 12:01 PM |