SunFounder ESP32 Starter Kit
Code
Note:
• You can open the file 5.2_tilt_switch.ino under the path of esp32-starter-kit-main\c\codes\5.
2_tilt_switch.
• After selecting the board (ESP32 Dev Module) and the appropriate port, click the Upload button.
• Always displaying “Unknown COMxx”?
After code upload successfully, the LED will be turned on when the switch is upright, and turned off when the switch
is tilted.
1.19 5.3 Detect the Obstacle
This module is commonly installed on the car and robot to judge the existence of the obstacles ahead. Also it is widely
used in hand held device, water faucet and so on.
Required Components
In this project, we need the following components.
It’s definitely convenient to buy a whole kit, here’s the link:
1.19. 5.3 Detect the Obstacle 69