Washing hands has never been more important, we all need to do it right. The proper process involves rubbing soap and water over every surface of your hands, and taking a full 20 seconds to do the job.
A no touch, sound activated 20 second timer can help with getting the timing right, and blinking LEDs has made it more fun for my boys to wash hands properly.
It’s a simple process to build it and I’ve chosen to use a Circuit Playground Express board.
This is a great beginner project to show how to make a real product with a few ‘blocks’ of code!
This is what I ended up with:
When the CPX is first powered on or reset, the on start block will run. In it we set the NeoPixel brightness to 10, call the blink function with arguments of 1 for color and 2 for times .
Then the pixels are turned of and the on-board red LED is turned on by setting the pin high.
When the loud sound is detected, the code in the on loud sound block runs. This calls the prep_countdown function and the countdown function.
Hopefully you should end up with something like this:
If you want to try this project out yourself, you can either:
Or import the project file: