This project is under development, it just for testing with ESP32, DHT22 and hit API's served somewhere. Supported sensor for this project based on DHT library:
- DHT 11
- DHT 22
- DHT 21
// Uncomment whatever type you're using!
//#define DHTTYPE DHT11 // DHT 11
#define DHTTYPE DHT22 // DHT 22 (AM2302), AM2321
//#define DHTTYPE DHT21 // DHT 21 (AM2301)
Still on going development
-
Install ESP32 board manager to arduino IDE, Platformio, or VSCode Arduino
-
you need the SPIFFS sketch data uploader, to include it in the flash, please follow the tutorial here
-
Prepare wifi setting to connect ESP32 to the internet:
- Update
wifissid.txt
andwifipassword.txt
undersrc/main-esp32-dht22/data
folder. And change it according to your wifi, to make sure the ESP32 can connect to the internet
- Update
-
Prepare API Key and Host
const String apiKey = ""; // should be for x-api-key header value String deviceSerial = ""; // should be deviceSerial String host = "https://api.test.com"; // yout API host
- Upload SPIFFS data by using
Tools -> ESP32 Sketch Data Upload
(on Arduino IDE) - After that, just flash by pressing Upload button on Arduino IDE.
- Make sure to connect on wifi AP named
esp32_0
andtest
. - And hit
192.198.4.1
via your browser, then edit this:
- ESP32
- Not yet, will be updated soon