- Arduino IDE 2 (déjà installé, recommandé)
- Board
- In
File
-->Preferences
->Additionnal boards mana...
addhttps://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
- In
Tools
-->Board
->Boards Manager
, look for ESP32 and install it - In
Tools
-->Board
selectTTGO LoRa32-OLED
(even though this borad has no LoRa...)
- In
- Dependencies :
- TFT_eSPI
- In
User_Setup_Select.h
, selectSetup25_TTGO_T_Display
- In
- PubSubClient
- TFT_eSPI
- Check relevant exemples in
File
-->Exemples
- Compile & Upload a program in your board with the "arrow button"
If Serial error appears :
pip3 install pyserial
- Install Home Assistant with it's docker version
- Your work will hand-over on GitLab
- The Git repository will be created by YOUR TEACHER with your gitlab IDs (tell him with who you are)
- Your repository will be organized exctly so:
- images_videos
- Part1
- ESP
- ESP_motor.ino
- ESP_temp.ino
- Python
- *.py
- HA
- *.yaml
- README.md
- Part2
- ESP
- ESP_motor.yaml
- ESP_temp.yaml
- HA
- *.yaml
- README.md
- Part3
- ESP
- ESP_motor.ino
- ESP_temp.ino
- Python
- *.py
- HA
- *.yaml
- README.md
- README.md
- Every student should commit (not only one per group)
Every folowing steps must be descibed in a README.md
file at the root of your code repository.
A very short vidéo (~15-20 seconds) for each part must show the working features
-
ESP Board 1:
-
Read an analog value and send its value scaled on 8 bits to Serial. A potentiometer will simulate a temperature sensor. Code a simple filter (average for exemple) to avoid a noisy temperature.
-
Test mqtt publisher on ESP32 (with hivemq and mosquitto)
-
Merge the 2 previous codes to publish analog value as a temperature (0 to 255°) on topic
/I102/<yourname>/temperature
-
-
ESP Board 2:
-
Test mqtt sucriber on ESP32 (with hivemq and mosquitto)
-
Test moving servo motor
-
Merge the 2 previous codes to subscribe the motor angle from topic
/I102/<yourname>/air_flow
-
-
Write a python script to link the 2 topics : If temperature changed, then change the airflow with a function
-
Try to do the same scenario but with Home Assistant (no python script)
- Do the same as Part 1 but with ESPHome instead of MQTT. There is no need to write a python script, it should be linked with ESPHome.
💡 Find some help here
-
With the "NRF Connect" App, try to find the temperature UUID and bytes of the BLE thermometer
-
ESP (Board 1):
- Read temperature as a BLE client
- Send temperature on Serial
- Display the temperature on the board screen
-
On your computer with python:
- Read temperature as a BLE client (you can use 'bleak')
- Send it with MQTT on
/I102/<yourname>/temperature
- Test it with the Part 1 workflow
- Suggest and make a project with MQTT, BLE and a domotic assistant of your choice (Home Assistant is highly recommanded).
- Select one option available to enhance your project:
- Easy :
- Nice ESP32 Human Machine Interface (screen + buttons)
- Use other sensors
- Use another kind of ESP32 board
- Medium
- Turn ON/OFF an X10 plug
- Link a vocal assistant to your domotic assistant
- Hard
- Make a MQTT device with a STM32F746G Board
- Easy :