Posts

Showing posts from February, 2025

Custom MQTT Broker, Client and Dashboard Demo (Analog )

Image
This week I developed a solution to send data up and down to a broker using a custom MQTT implementaltion using Mosquitto MQTT on a Raspberry PI 4. I used the code from the microbit cloud gateway board as a starting off point. I substituted the green DFRobot extension board block to a 'serial write line' block and the rest of the code had been left untouched. This means that the gateway microbit forwards radio messages from the client microbits to the Raspberry Pi. On the Raspberry Pi side of things, a python script has to run in order to log serial messages from the microbit gateway. The messages are logged and the raw numerical values are extracted and stored as a variable. The script then forwards that stored variable and inserts it into a shell command:  $ mqtt_pub raspberrypi.local -t "test/demo" -m $VAR The script runs in an infinite loop, logging serial and repeating shell commands to the self-hosted MQTT broker running on the raspberry pi. This broker can now ...

Blog 3 - MQTT

Image
Blog 3 -MQTT Arthur Bilyk - 20097938  Week 2 - MQTT is a standardized messaging protocol designed for machine-to-machine communication. It is commonly used by smart sensors, wearables, and other IoT devices that operate on networks with limited bandwidth. Due to its lightweight design and ease of implementation, MQTT efficiently transmits data between IoT devices. It enables communication both from devices to the cloud and from the cloud back to the devices. https://aws.amazon.com/what-is/mqtt/ For this lab we were tasked to setup an IoT MQTT panel using an app of that same name, to send and receive messages from our Micro:Bits.      First I setup a 'debug' panel which displayed the raw JSON payload, allowing me to verify the format was correct and that it was receiving all of the micro:bits. I could then setup gauges to corresponding micro:bits using the JSON payload to view their rotation. I then added a slider which moved from 0 - 255 which i could then use to se...