The whole Mushrooms' Paradise blog
Hardware
My Raspberry PI model is 4B with 4GB RAM
My ESP32 model is NodeMCU-32S
My laptop is Intel Core i5 and has Windows 10 Home OS.
Maybe I will need to add something there in the future, but so far the configuration steps are below, with links to detailed instructions on each step.
Steps for configuring PI
- Download Pi Imager for Windows on the laptop Raspberry Pi OS
It will install all updates up-to-date automatically. It also comes with Chromium browser and Thonny IDE that I plan to use. If Thonny will not be enough - I will switch to Visual Studio code
- Using PI imager flush “Raspbian OS with Desktop” image to micro SD card (I used 32Gb)
- Snap on Enviro Hat on PI and plug in SD card, screen, keyboard, mouse and power
- (Optional) Install Visual Studio Code on PI Installing Visual Studio Code on the Raspberry Pi
- Install Enviro Hat managing software on PI. Using Terminal run
git clone https://github.com/pimoroni/enviroplus-python
cd enviroplus-python
sudo ./install.sh
Steps for configuring ESP32
Steps are different depending on what programming language and IDE will be used
- If one decides to proceed with coding ESP32 in C++ and using laptop to upload the code, then
1.1 Install Arduino IDE on the laptop Install the Arduino Software (IDE) on Windows PCs
1.2 Install ESP32 library for Arduino IDE on the laptop. Installing ESP32 in Arduino IDE (Windows, Mac OS X, Linux)
- If the code will be in Python and will be uploaded from Raspberry PI itself, then
2.1 Connect ESP32 to PI using USB cable.
2.2 Upload MicroPython firmware on ESP32 Raspberry Pi ESP32 MicroPython Tutorial
2.3 Configure Thonny to See ESP32 by going to Tools > Options > Interpreter
In the first dropdown list one can select an interpreter which in my case should be “MicroPython on a generic device”.
In the second dropdown list one should select the port to which the ESP32 board is connected.
(Optional) Configuring VNC
VNC will be useful so I can code on PI with all the comfort of a laptop
1. Download and install VNC server on PI Download VNC Server for Raspberry Pi | VNC Connect
2. Configure VNC server on PI VNC (Virtual Network Computing)
3. Download VNC viewer for windows Download VNC Viewer for Windows | VNC Connect
4. Set a static IP for PI (I didn’t do it, just keep it here for a future reference) https://raspberrytips.com/find-current-ip-raspberry-pi/#How_to_set_a_static_IP_(LAN_or_WLAN)
That’s it. My Raspberry PI and ESP32 are configured.