Skip to content

Wireless Network Communications or IoT protocols Web dashboards

jakingy edited this page Apr 29, 2024 · 5 revisions

Nucleo to Raspberry Pi

Since the Nucleo board does not come with on-board Wi-Fi communications, it cannot directly communicate over MQTT. Instead, it forwards JSON packets containing the pedal sensor data to a Raspberry Pi which is physically connected via a serial USB cable. The serial connection uses a board rate of 115200 baud/sec. The Raspberry Pi then publishes the packets to the respective MQTT topic.

MQTT

MQTT has been chosen as the primary mode of wireless communication between nodes. All MQTT messages will contain JSON contents to ensure interoperability between various systems and programming languages.

MQTT Host (Broker): csse4011-iot.zones.eait.uq.edu.au

Topic <studentnumber>/pedal will be used for pedal data. The Pedal + Nucleo + Pi node will publish JSON data to this topic. Both the turtle bot and base node will be subscribed to this topic. The pedal JSON data will look something like:

{"x":2323,"y":-1204}

Topic <studentnumber>/lidar will be used for LIDAR positional information. The turtle bot will publish JSON data to this topic and the base node will subscribe to this data to display it on a dashboard. The LIDAR positional information JSON data will look something like:

{"x":2323,"y":-1204}

Dashboard

We have decided to use a custom web dashboard with a React-based web frontend and Flask-based backend server. This enables a large amount of flexibility in terms of the features and style of the dashboard whilst still providing access to well tested Python libraries for handling JSON and MQTT.

Protocol Diagram

protocol_diagram