I'm seeing some progress with MQTT. I'm able to publish from the pico, save messages on the RPi 4B as the broker, and retrieve them on my desktop PC (Linux). I think I'll have what I want if I can:I've read some about MQTT, but I don't know anything about it. How hard would it be to implement a server on a pico, and the client on the PC?2. How to download the log file, using HTML (or is there a better way?)
Any suggestions on how to do this, or better ways, are appreciated. Thanks.
- Merge MQTT stuff with my program
Send formatted strings with the Date and Time that I need, instead of "Hello...!"
Write a program to subscribe to the topic and write messages out in the format that I want (like "logfile.csv")
Clean up the code
Sample from the MQTT broker:
Code:
testTopic─Topics (1, 12 messages)─╮─────────────────Payload (Bytes: 16)─────────────────╮ testTopic = Hello from │Hello from Pico! │ │ │ │──────────History (12, every ~2.8 seconds)───────────╮ │Time QoS Value │ │16:14:57.184 AtMostOnce Hello from Pico! │ │16:14:57.527 AtMostOnce Hello from Pico! │ │16:15:00.510 AtMostOnce Hello from Pico! │ │16:15:03.499 AtMostOnce Hello from Pico! │ │16:15:06.545 AtMostOnce Hello from Pico! │ │16:15:09.499 AtMostOnce Hello from Pico! │ │16:15:12.579 AtMostOnce Hello from Pico! │ │16:15:15.507 AtMostOnce Hello from Pico! │ │16:15:18.505 AtMostOnce Hello from Pico! │ │16:15:21.507 AtMostOnce Hello from Pico! │ │16:15:24.508 AtMostOnce Hello from Pico! │ │16:15:27.511 AtMostOnce Hello from Pico! │ │ │ │ │ │ │ │ │ │ │ q Quit Tab Switch to Topics mqttui 0.21.1 @ mqtt://192.168.0.5
Statistics: Posted by JKJ — Tue Nov 26, 2024 10:46 pm