Prepare a microphone, an analog-to-digital converter, a single chip microcomputer and a flash on the hardware.
Operating steps:
First save the sound of turning on and off the lights in FLASH, and it is best to save your own voice directly.
Then compare the characteristics of each received voice with the voice in FLASH, compare the similarity with the threshold, and execute the corresponding action.
Repeated testing to find the appropriate threshold.