inhabitat:kaunas:day02
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| inhabitat:kaunas:day02 [2026/05/29 09:00] – jan.sonntag | inhabitat:kaunas:day02 [2026/05/29 09:05] (current) – jan.sonntag | ||
|---|---|---|---|
| Line 21: | Line 21: | ||
| We are using the **DFRobot Analog Capacitive Soil Moisture Sensor**. | We are using the **DFRobot Analog Capacitive Soil Moisture Sensor**. | ||
| - | |||
| - | {{ : | ||
| - | <wrap em>📷 PLACEHOLDER — Insert a photo of the DFRobot capacitive soil moisture sensor here.</ | ||
| ===== 2. Connecting the Sensor to the DOIT ESP32 ===== | ===== 2. Connecting the Sensor to the DOIT ESP32 ===== | ||
| Line 40: | Line 37: | ||
| * Double-check GND is shared between the sensor and the board. | * Double-check GND is shared between the sensor and the board. | ||
| - | {{ :day2: | + | <WRAP center round tip 60%> |
| - | <wrap em>📷 PLACEHOLDER — Insert the wiring diagram | + | Here an example to connect to similiar MCU. Make sure to check the Pinout of your specific board! |
| + | </ | ||
| + | |||
| + | < | ||
| + | <imgcaption image4|Schematic>{{ https:// | ||
| ===== 3. Reading the Sensor with the Serial Monitor ===== | ===== 3. Reading the Sensor with the Serial Monitor ===== | ||
| Line 49: | Line 50: | ||
| **Serial** is a way for the ESP32 to send text back to your computer over the | **Serial** is a way for the ESP32 to send text back to your computer over the | ||
| - | USB cable. By calling | + | USB cable. By calling |
| - | ``Serial.println()`` whenever we have something to show, we can print our | + | '' |
| sensor readings to the screen in real time. This is incredibly useful for | sensor readings to the screen in real time. This is incredibly useful for | ||
| checking that everything is wired correctly and that the numbers change when | checking that everything is wired correctly and that the numbers change when | ||
| Line 56: | Line 57: | ||
| Open the Serial Monitor in PlatformIO and make sure the **baud rate matches** | Open the Serial Monitor in PlatformIO and make sure the **baud rate matches** | ||
| - | the value you set in ``Serial.begin()`` (commonly 115200). | + | the value you set in '' |
| <code cpp> | <code cpp> | ||
| Line 76: | Line 77: | ||
| **password** of our workshop access point. | **password** of our workshop access point. | ||
| - | In ``setup()`` we tell the ESP32 to connect, then wait in a short loop until | + | In '' |
| the connection succeeds. We can print the status to Serial so we know when | the connection succeeds. We can print the status to Serial so we know when | ||
| we're online. | we're online. | ||
| Line 100: | Line 101: | ||
| we will only **publish** — sending messages out. We will not subscribe. | we will only **publish** — sending messages out. We will not subscribe. | ||
| - | <wrap em>📊 PLACEHOLDER — Insert / link our prepared MQTT presentation here.</ | + | {{pdfjs 500px>: |
| ===== 6. Publishing a Message to the Broker ===== | ===== 6. Publishing a Message to the Broker ===== | ||
| Line 106: | Line 107: | ||
| For our final step, we connect to the **MQTT broker** and send a single | For our final step, we connect to the **MQTT broker** and send a single | ||
| message of **your choosing** — any text string you like, for example | message of **your choosing** — any text string you like, for example | ||
| - | ``"hello from my esp32"``. | + | '' |
| * This is **not** the soil moisture value. That's a separate exercise. Here we are just proving we can talk to the broker by sending a simple string. | * This is **not** the soil moisture value. That's a separate exercise. Here we are just proving we can talk to the broker by sending a simple string. | ||
| Line 132: | Line 133: | ||
| * Learned the basics of MQTT | * Learned the basics of MQTT | ||
| * Published your own message to the MQTT broker | * Published your own message to the MQTT broker | ||
| - | |||
| - | Nice work — see you on the next day! | ||
inhabitat/kaunas/day02.1780038039.txt.gz · Last modified: 2026/05/29 09:00 by jan.sonntag