In this tutorial we will check how to create a very simple alarm system with a buzzer and a PIR motion sensor. We will be using the Arduino core, running on the ESP32. The tests were performed using a DFRobot’s ESP32 module integrated in a ESP32 development board, and a DFRobot’s PIR sensor module.
How to control a buzzer with PWM, using the ESP32 and the Arduino core.
The objective of this post is to explain how to use the Pulse Width Modulation (PWM) technique with the ESP8266 and the main differences of the implementation comparing with the Arduino.