Keyestudio ESP32 Manual page 133

Starter kit
Hide thumbs Also See for ESP32:
Table of Contents

Advertisement

3. Wiring Diagram
4. Test Code
Add libraries to Arduino IDE first.
/*
keyestudio ESP32 Inventor Learning Kit
Project 23.1 Smart Cup
http://www.keyestudio.com
*/
#include
<xht11.h>
xht11 xht(26);
//The DHT11 sensor connects to IO26
unsigned char
dat[]
void
setup() {
// put your setup code here, to run once:
Serial.begin(9600);
}
void
loop() {
// put your main code here, to run repeatedly:
if
(xht.receive(dat)) {
8.5. Arduino Project
=
{0,0,0,0};
//Define an array to store temperature and humidity data
//Check correct return to true
ESP32 Starter Kit
(continues on next page)
129

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the ESP32 and is the answer not in the manual?

Questions and answers

Subscribe to Our Youtube Channel

Related Products for Keyestudio ESP32

Table of Contents

Save PDF