This repository contains the code and instructions required to build a simple weather station powered by an esp32 microcontroller, a DHT22 temperature sensor and an infrared receiver.
It uses esp-idf framework for managing the system tasks and open-meteo api for sourcing the weather data.
- LOLIN32 Lite microcontroller (like this one here)
- DHT22 temperature and humidity sensor (see here)
- infrared remote and receiver (example here)
- small breadboard
- jumper wires
- some batter compatible with the microcontroller.
TODO
First you need to get the esp-idf framework set up on your machine. You can find instuctions on how to do it here.
If you are fortunate enough to be using an Arch-based distribution, you can download esp-idf using the following command:
sudo pacman -S esp-idf
After that you will be promted to install the python tool using:
/opt/esp-idf/install.sh
And then source all of them so that they are available in PATH environment variable
source /opt/esp-idf/export.sh
I recommend aliasing the above command inside of your .bashrc / .zshrc as you will need to run it in every new terminal window where you want to work with esp-idf framework. An example of such alias can be seen below:
alias get_idf='source /opt/esp-idf/export.sh'
After that you need to set the wifi password for the project using the command:
idf.py menuconfig
For convenience I recommend aliasing idf.py to idf in you shell config. After you've done that, the project can be built, flashed onto the board and started to be monitored using the following command:
./run
In case you want to modify the code and submit a pull request, make sure to have clangd installed and run the formatting script before submitting the code to avoid code style merge conflicts.
./reformat