From 3281a3ecd55a540c2ebdfaf3c3968047e608ec54 Mon Sep 17 00:00:00 2001 From: Martin Crossley Date: Thu, 2 Oct 2025 21:18:42 +0100 Subject: [PATCH] Add .md to README and clarify what example does Renamed README to README.md to improve how it renders in an IDE and when browsing the online repository. Improved the example description to clarify why the temperature updates might appear unexpectedly sporadic to the user; and document how to read the current led status. --- pico_w/wifi/mqtt/{README => README.md} | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) rename pico_w/wifi/mqtt/{README => README.md} (87%) diff --git a/pico_w/wifi/mqtt/README b/pico_w/wifi/mqtt/README.md similarity index 87% rename from pico_w/wifi/mqtt/README rename to pico_w/wifi/mqtt/README.md index e1889bb61..e3bc2ab9b 100644 --- a/pico_w/wifi/mqtt/README +++ b/pico_w/wifi/mqtt/README.md @@ -34,8 +34,8 @@ When building the code set the host name of the MQTT server, e.g. export MQTT_SERVER=myhost cmake .. ``` - -The example should publish its core temperature to the /temperature topic. You can subscribe to this topic from another machine. +The example checks its core temperature every ten seconds and if it has changed, publishes it to the +/temperature topic. You can subscribe to this topic from another machine. ``` mosquitto_sub -h $MQTT_SERVER -t '/temperature' @@ -47,6 +47,11 @@ You can turn the led on and off by publishing messages. mosquitto_pub -h $MQTT_SERVER -t '/led' -m on mosquitto_pub -h $MQTT_SERVER -t '/led' -m off ``` +You can check the current the state of the led by subscribing to the /led/state topic on another machine. +``` +mosquitto_sub -h $MQTT_SERVER -t '/led_state' +``` + # Security