Step 01
Install the Arduino IDE
This is the program you write and upload code in. You do not need any other editor.
Install it, then open it once and let it finish setting itself up. It may ask permission to install drivers. Allow it.
Step 02
Teach it about ESP32 boards
The IDE ships knowing about Arduino boards only. Your board is an ESP32, so you point the IDE at Espressif's list first.
Paste this into Additional boards manager URLs, then click OK:
https://espressif.github.io/arduino-esp32/package_esp32_index.jsonSearch for esp32 and install esp32 by Espressif Systems, version 3.3.7.
Several hundred megabytes of compiler. Leave it running and read step 03 while you wait.
Step 03
Install three libraries
A library is code someone else wrote so you do not have to. Install all three now, even though you will not use the last two until later.
| Search for | Version | What it is for |
|---|---|---|
PubSubClientby Nick O’Leary | 2.8 | MQTT. Every example needs it. |
DHT sensor libraryby Adafruit | 1.4.6 | The temperature and humidity sensor, from tutorial 02. |
ESP32Servoby Kevin Harrington | 3.0.9 | The servo, from tutorial 04. |
The DHT library depends on Adafruit Unified Sensor. When the IDE offers to install it too, say yes. Without it, tutorial 02 will not compile.
Step 04
Add the Garden Spine library
This is the code your team shares. It handles Wi-Fi, security, and the message format so your sketch stays short.
- Download it as a ZIP. Open the ladybug-starter repository, click the green Code button, then Download ZIP. Do not unzip it.
done when: you have a file called
ladybug-starter-main.zip. - Hand the ZIP to the IDE.
done when: the console at the bottom says the library was installed.
- Check it worked. Open and scroll to the very bottom, under Examples from custom libraries.
done when: you see
GardenSpinewith five sketches inside it.
Orientation
Where your files live
Two folders matter, and mixing them up is the most common way to lose an afternoon.
Your documents folder
- 01_FirstMessage
01_FirstMessage.inothe sketch you edit and uploadconfig.hyou create this in tutorial 01. Your password lives here
Yours. Edit freely.
The IDE's own libraries folder
- GardenSpine
src/GardenSpine.hput here by Add .ZIP Librarysrc/spine_ca.hthe programme's security certificate, already filled inexamples/the five sketches in the menu above
Leave alone. You never edit this.
Your sketch says #include <GardenSpine.h> and the IDE finds it in the second folder. You do not copy it anywhere.