Whistling detection Arduino
2. Arduino code
2.3 LED strip with MOSFET
Now, all we have to do is connect digital pin 13 to the gate of a N-MOSFET as in the schematic below. You could change the code in order to control all 3 colors of the LED strip. Make the connections below and upload the next code.
There you go, I can turn on and off the LED strip just by whistling.
Thank you for everything.
Remember to visit my Patreon page.