EasyManua.ls Logo

Keyestudio ESP32 - Page 262

Keyestudio ESP32
344 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ESP32 Starter Kit
2. Add an “if else” block. Put a “read PIR motion sensor” block in the hexagon box and set the interface to IO5,
thus it will determine whether there is a human motion. Add two “serial print” blocks after “then” and “else”
and set both modes to “warp”. If the condition is satisfied, print “Someone Invaded”. Or else, print “No one”,
then add a 1s delay time.
Complete Code:
258 Chapter 9. Scratch Tutorial

Table of Contents