EasyManuals Logo

SunFounder ESP32 User Manual

Default Icon
771 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #374 background imageLoading...
Page #374 background image
SunFounder ESP32 Starter Kit
(continued from previous page)
# Create a pin object named greyscale, set pin number 14 as input
line = machine.Pin(14, machine.Pin.IN)
while True:
# Check if the value is 1 (black)
if line.value() == 1:
# Print "black"
print("black")
time.sleep(0.5)
# If the value is not 1 (it's 0, which means white)
else :
# Print "white"
print("white")
time.sleep(0.5)
When the line tracking module detects there is black line, there appears “black” on the Shell; otherwise, “white” is
displayed.
3.23 5.5 Detect Human Movement
Passive infrared sensor (PIR sensor) is a common sensor that can measure infrared (IR) light emitted by objects in its
field of view. Simply put, it will receive infrared radiation emitted from the body, thereby detecting the movement of
people and other animals. More specifically, it tells the main control board that someone has entered your room.
Required Components
In this project, we need the following components.
Its definitely convenient to buy a whole kit, heres the link:
Name ITEMS IN THIS KIT LINK
ESP32 Starter Kit 320+
You can also buy them separately from the links below.
COMPONENT INTRODUCTION PURCHASE LINK
ESP32 WROOM 32E
ESP32 Camera Extension -
Breadboard
Jumper Wires
Resistor
LED
PIR Motion Sensor Module
368 Chapter 3. For MicroPython User

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

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

SunFounder ESP32 Specifications

General IconGeneral
BrandSunFounder
ModelESP32
CategoryController
LanguageEnglish