Solution architecture
In the solution architecture, we need to discuss two different parts: the firmware and the cloud backend. Let's talk about the firmware first.
The device firmware
The following diagram shows the main components of the firmware:
The GPIO controller will configure and drive the GPIO pins of ESP32. There are four pins to be used as inputs and three other pins as outputs. The input pins will read from the tactile buttons (or the speed buttons of the fan in the second prototype) and the output pins will control the relays. When the stop button is pressed, all relays will switch off. If any one of the speed buttons is pressed, the corresponding relay will switch on. The GPIO controller also communicates with the AWS module to send the button state information and to receive voice commands from Alexa.
The Wi-Fi communication module connects to the local Wi-Fi network as specified by the...