This page outlines the tips I've learnt as I've tried to set up an internal weather station to compliment the external station. I started with Arduino IDE but prefer VSCode so quickly ported over to that.
I've used the ESP32S Dev kit board. I bought this one from AliExpress.
This guide is a useful diagram to get the wiring right. Also the names are labelled on tbe bottom.
If needing to set up again. My working setup uses platform.io extension to work
- Follow these instructions
- Setup udev rules for platform.io
- Specifically - read the part labelled Similarly, Arch users may need to add their user to the “uucp” group.
sudo usermod -a -G uucp $USER # log out and back in of course
sudo usermod -a -G lock $USER # log out and back in of course
- Set up the right default project location (seems to have issues with the Nextcloud document symlinks otherwise. Follow guide here
- Open new PlatformIDE terminal (within VSCode)
- Enter
pio settings set projects_dir /new/path/projects/dir
This site has logs of info on the settings and config that can be applied within VSCode.
If you've been playing around with lots of code and want to wipe back to the start you can follow the steps here.
In a PlatformIO terminal (in vscode) pio run -t erase
. NOTE: If getting issues connecting, you may need to hold down the boot button on the board (or press and release). Once done hit the reset button to restart (although won't do much).
This information for reference if wanting to use the ArduinoIDE
Follow these instructions
Make sure permissions to USB setup right on Manjaro. This page was useful. Specifically:
sudo pamac install arduino arduino-avr-core
sudo usermod -a -G uucp $USER # log out and back in of course
Similar to reported here.
sudo pip install pyserial
espressif/arduino-esp32#13 On ubuntu 20.04 Python2 is gone and Python3 is default. But python program not visible (instead python3).
Run this to add a symlink
sudo ln -s /usr/bin/python3 /usr/bin/python
Check in the code for the serial baud rate set and set up the serial monitor for the same.
9600 is on the standard program.
Reading of the ESP32 dev kits:
- When running and settled - 55-65ma (Wifi on I think)
- When running and settled - 48.2ma
- Deep sleep 4.7ma
Seems to line up with this good summary comparison here. time to get a firebeetle board.
This gives a lot of good advice YouTube
I've got a 1W panel which I think will be sufficient for the project. Start with the dev kit but look to switch to the firebeetle when it arrives.