Video Link: https://youtube.com/shorts/WS1_VS1gYc0
My project is a dryer notification device, made to make a sound upon a dryer cycle ending. This device could have applications outside of use with a dryer, but a dryer was the machine it was intended for use with.
The device consists of a Circuit Playground Express board, a battery, two alligator clip wires, a toggle switch, a red solo cup, and pieces of painter's tape.
The red solo cup acts as the chassis for the components. A small square hole was made into it to mount the toggle switch to. Alligator clips connect the switch to pins on the board. Painter's tape keeps the switch and board mounted to the top of the cup as well as keeps the battery mounted to its side.
On the code side of things, the board reads for a signal from the A1 pin. If its HIGH then a light is turned on to signify its been turned on, otherwise if the board reads LOW then it turns off the light. While the A1 pin reads HIGH, the accelerometer functions are called and assigns values to float variables for the X and Y axis. A conditional operator using absolute value functions checks to see if both the X and Y accelerations are less than 1.0 which signifies the board is still. These checks occur at a 100ms interval. If there are 20 consecutives successful checks for whether the device is still, then a tone is played signifying the dryer has stopped moving and thus the dryer cycle has ended. The no movement check streak is in place to make up for the interval at which the device checks the accelerometer's reading, as it might happen to catch it when both X and Y accelerations are less than 1.0 but the dryer has not actually stopped moving.
Comments
Please log in or sign up to comment.