I made a paper/tutorial about sensor simulation with real-time visualizer. I came to this topic by combining an aspect from my electromechanics degree, namely sensors and automatization and my IT experience.
First I searched for a library that would give me the option to simulate sensor data and publish this with the MQTT protocol, MQTT being a lightweight protocol that is designed for communication between Internet of Things (publishers) and other machines (subscribers). Pysor seemed to fill the roll of subscriber. Next I looked for a program that I could run on my computer that could act as the subscriber. For this I used Mosquitto.
The problems started when the published messages just did not arrive at the subscriber. Manual command prompt publishing did work, so I began debugging my code. After a long time of fruitlessly changing variables I asked chatgpt and it remarked that I needed an extra line of code to actually connect to Mosquitto. This somewhat surprised me as this code came straight from the Pysor github page.
After this I looked for a way to visualize the data. Since chatgpt had helped me earlier I decided on an experiment where I would bounce between chatgpt and anthropic and see who could actually generate code that would work and do what I asked. This did not go very smoothly, although they did do a better job then I could have done.
Finally I did some research for a light literature study, namely that visualizations help people make better decisions and are generally helpful.
Leave a Reply