This activity is part of the Citilab Course. Check it out!
Controlling Lights with Hand Claps
DC motors
With the Microphone library it is possible to detect the number of times one claps their hands.
This detection allows us to activate any element of the home display, for example the lighting.
The microphone is connected to the analog input A1.
Turtle Library
To simulate different lighting levels we can use the screen.
We can use the fill display with _ block that we will find in the Turtle library instead of draw rectangle … from the TFT library.
Challenge 1: Build a program with different lighting levels controlled by clapping your hands.
Solution to challenge 1
This activity is part of the Citilab Course.
⬅️ Previous activity | Next activity ➡️ |
---|
© por Citilab Edutec 2019-2022.
Este trabajo tiene una licencia CC-BY-SA 4.0.