User Tools

Site Tools


inhabitat:kaunas:day02

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
inhabitat:kaunas:day02 [2026/05/29 09:00] jan.sonntaginhabitat: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**.
- 
-{{ :day2:soil_sensor.jpg?400 |}} 
-<wrap em>📷 PLACEHOLDER — Insert a photo of the DFRobot capacitive soil moisture sensor here.</wrap> 
  
 ===== 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:wiring_diagram.png?500 |}} +<WRAP center round tip 60%> 
-<wrap em>📷 PLACEHOLDER — Insert the wiring diagram photo showing sensor-to-ESP32 connections here.</wrap>+Here an example to connect to similiar MCU. Make sure to check the Pinout of your specific board! 
 +</WRAP> 
 + 
 +<imgcaption image3|Wiring of the analog sensor>{{ https://raw.githubusercontent.com/EOLab-HSRW/intro-to-iot/master/diagrams/wemos-soil_bb.png?400 |}}</imgcaption> 
 +<imgcaption image4|Schematic>{{ https://raw.githubusercontent.com/EOLab-HSRW/intro-to-iot/master/diagrams/wemos-soil_schematic.png?400 |}}</imgcaption>
  
 ===== 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 ``Serial.begin()`` once at startup and then +USB cable. By calling ''Serial.begin()'' once at startup and then 
-``Serial.println()`` whenever we have something to show, we can print our+''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 ''Serial.begin()'' (commonly 115200).
  
 <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 ''setup()'' we tell the ESP32 to connect, then wait in a short loop until
 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.</wrap>+{{pdfjs 500px>:latinet:unicaes:workshops:mqtt.pdf?75}}
  
 ===== 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"``.+''"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