Chapter 12: Practice ā A Voice-Controlled Smart Fan
In this final chapter of the book, we are going to develop another smart home device, a smart fan. We will take an ordinary fan that has mechanical buttons on it to control the fan speed and we will convert this fan into a smart one where we can set the speed by voice in addition to its buttons. The fan that I am going to hack in this project has four buttons, where one button is for stopping the fan and the other three are for three different speed modes, from slow to fast. The idea is to intercept the button presses by connecting the speed buttons of the fan to GPIO pins of ESP32 and control the speed via relays when a button press is detected. It will also respond to voice commands by changing the relay states. The voice assistant will be Amazon Alexa and we will use Amazon IoT Core and Lambda as the backend services to handle the voice commands.
This chapter introduces a great opportunity to practice what we have learned...