Skip to content

Commit 3281a3e

Browse files
author
Martin Crossley
committed
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.
1 parent aed0867 commit 3281a3e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

pico_w/wifi/mqtt/README renamed to pico_w/wifi/mqtt/README.md

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ When building the code set the host name of the MQTT server, e.g.
3434
export MQTT_SERVER=myhost
3535
cmake ..
3636
```
37-
38-
The example should publish its core temperature to the /temperature topic. You can subscribe to this topic from another machine.
37+
The example checks its core temperature every ten seconds and if it has changed, publishes it to the
38+
/temperature topic. You can subscribe to this topic from another machine.
3939

4040
```
4141
mosquitto_sub -h $MQTT_SERVER -t '/temperature'
@@ -47,6 +47,11 @@ You can turn the led on and off by publishing messages.
4747
mosquitto_pub -h $MQTT_SERVER -t '/led' -m on
4848
mosquitto_pub -h $MQTT_SERVER -t '/led' -m off
4949
```
50+
You can check the current the state of the led by subscribing to the /led/state topic on another machine.
51+
```
52+
mosquitto_sub -h $MQTT_SERVER -t '/led_state'
53+
```
54+
5055

5156
# Security
5257

0 commit comments

Comments
 (0)