Skip to content

Commit 3769031

Browse files
authored
Merge pull request #134 from mciwing/iot_small_fixes
small fixes
2 parents 1c50736 + ce9f4d4 commit 3769031

File tree

3 files changed

+3
-5
lines changed

3 files changed

+3
-5
lines changed

docs/micropython/mqtt.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ wlan = do_connect()
119119

120120
### MQTT Communication 📡
121121

122-
Nachdem wir uns nicht nur mit der großen weiten Welt verbinden wollen, sondern auch Interagieren (senden und empfangen), müssen wir uns nun ein geeignetes Protokoll aussuchen. Wie bereits beschrieben, ist MQTT im Bereich IoT sehr beliebt und wird von vielen Anbietern unterstützt. Wir sollen nun unseren EPS32 so programmieren, dass er sich mit dem Internet und mit dem MQTT-Broker verbindet und anschließend Daten sendet und empfängt.
123-
124122
Now that we don't just want to connect our ESP32 to the outside world, but also interact with it (send and receive data), we need to choose an appropriate communication protocol. As discussed earlier, MQTT is widely used in IoT applications and supported by many providers. In this section, we will program the ESP32 to connect to Wi-Fi and the MQTT broker. After that we will send and receive messages over defined MQTT topics.
125123

126124
#### Initial Setup
@@ -249,7 +247,7 @@ while True:
249247
???+ question "Task: Receive and send messages"
250248
Now it's your turn to send and receive messages. Try the code above and see if you can receive and send messages. Therefore:
251249

252-
- Follow the steps above to connect to the broker (`boot.py` and `credentials.py`)
250+
- Follow the steps above to connect to the broker (`boot.py` and `config.py`)
253251
- Check for new messages in the subscribed topic (`settings`) in a loop and publish a message to the `kpi` topic once before the loop starts.
254252
- Got to [HiveMQ](https://console.hivemq.cloud/) and click on 'Manage Cluster'. Switch to the 'Web Client' tab and connect with your credentials. On the right side click on 'Subscribe to all messages'. Now you should see the message you published with your ESP32. (Hint: since the publish function is called once before the loop starts, it is a good idea to soft-reset you ESP32 in order to send the message again)
255253
- On the left side in the 'Web Client' tab click on 'Send Message'. Enter the `kpi` topic and publish a message with a payload of your choice. You should see the message in the console of your ESP32.

docs/micropython/sensors.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ Now we are all set up and we can start coding!
125125
As with our first program, we only need to edit the `main.py` file. We begin by importing the required libraries:
126126
127127
```python
128-
from machine import ADC
128+
from machine import ADC, Pin
129129
from time import sleep
130130
```
131131

docs/micropython/setup.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ Below are the step-by-step instructions:
9595
<img src="/assets/micropython/thonny2.png" alt="Thonny 2" style="width: 45%;">
9696
</div>
9797

98-
After clicking on **Install** the firmware will be flashed onto the ESP32. :white_check_mark:
98+
After clicking on **Install** the firmware will be flashed onto the ESP32. Sometimes the flashing process can lead to an error. Try holding the **boot** button on the ESP32 while clicking on **Install**. :white_check_mark:
9999

100100
???+ info "Verify the Installation"
101101

0 commit comments

Comments
 (0)