Controlling Adruino devices using MQTT
(The above picture displays two LEDs and temperature capture. However, the code is for three LEDs, temperature and light intensity feed) Today was the second week of IOT class, in which we were supposed to interact with MQTT server by subscribing to the users and their messages and pushing the message to MQTT broker to control the devices connected to Arduino device. The MQTT is an MQ Telemetry Transport, providing easy communication between many IoT nodes. The central piece is a broker, which connects to the various nodes which can subscribe to topics. In our experiment, we connected the Arduino device to MQTT broker using the Arduino Ethernet sheet and Ethernet cable to connect to the internet. For this, a sample code to establish this connection is being downloaded from the internet. This code we extended to control the three LEDs (which could be any devices) and two inputs devices, one temperature sensor to capture room temperature and LDR to capture the light intensit