Update README
This commit is contained in:
42
README.org
42
README.org
@@ -1,38 +1,58 @@
|
||||
* Homeostasis
|
||||
|
||||
Temperature and humidity sensor that communicates via MQTT. The project is implemented using a Wemos D1 mini ESP32 board with a DHT22 sensor.
|
||||
Temperature and humidity sensor that communicates via MQTT. The project is implemented using a Wemos D1 mini ESP32 board with a DHT22 shield.
|
||||
|
||||
This specific shield needs to have the data line connected to a pin different to D4, as explained in [[https://blog.zs64.net/2018/02/fixing-the-wemos-d1-mini-dht22-shield][this blog post]].
|
||||
|
||||
#+ATTR_HTML: :width 60%
|
||||
[[./result.png]]
|
||||
[[./board.jpg]]
|
||||
|
||||
** Pinout of the board
|
||||
|
||||
#+ATTR_HTML: :width 40%
|
||||
[[./pinout.png]]
|
||||
|
||||
** Dependencies
|
||||
|
||||
- [[https://github.com/adafruit/DHT-sensor-library][Adafruit DHT sensor library]]
|
||||
- [[https://github.com/adafruit/Adafruit_Sensor][Adafruit Unified Sensor Driver]]
|
||||
- [[https://github.com/marvinroger/async-mqtt-client][Async MQTT client]]
|
||||
- [[https://github.com/bblanchon/ArduinoJson][ArduinoJSON]]
|
||||
|
||||
** Configuration
|
||||
|
||||
In the data directory, there is a JSON file that allows the configuration of multiple values:
|
||||
|
||||
- ssid: WiFi network name
|
||||
- psk: WiFi password
|
||||
- mqtt_host: IP address of the MQTT broker
|
||||
- mqtt_user: username that has write access on the MQTT broker
|
||||
- mqtt_password: password for the user that has write access on the MQTT broker
|
||||
- mqtt_port: port used by the MQTT broker
|
||||
- mqtt_topic: channel name
|
||||
- device_id: unique identifier of the sensor
|
||||
- sleep_time: time interval between each data transmission
|
||||
- connection_attempts: maximum connection attemps to the network
|
||||
|
||||
The file needs to be renamed to config.json
|
||||
|
||||
** Deployment
|
||||
|
||||
The software uses the Arduino framework and the development environment of [[https://platformio.org/][PlatformIO]], which offers better tools than the Arduino IDE.
|
||||
|
||||
1. Upload the configuration file to the board:
|
||||
The software uses the Arduino framework and the development environment of [[https://platformio.org/][PlatformIO]], which offers better tooling than the official Arduino IDE.
|
||||
|
||||
*** Generate compilation database
|
||||
#+begin_src sql
|
||||
pio run -t compiledb
|
||||
#+end_src
|
||||
*** Upload the configuration file to the board
|
||||
#+begin_src shell
|
||||
pio run -t uploadfs
|
||||
#+end_src
|
||||
|
||||
2. Compile the project
|
||||
|
||||
*** Compile the project
|
||||
#+begin_src shell
|
||||
pio run -t compile
|
||||
#+end_src
|
||||
|
||||
3. Upload firmware
|
||||
|
||||
*** Upload firmware
|
||||
#+begin_src shell
|
||||
pio run -t upload
|
||||
#+end_src
|
||||
|
||||
Reference in New Issue
Block a user