Controlling Lights with Hand Claps

Controlling Lights with Hand Claps

von Citilab Edutec


Citilab ED1

Weitere Komponenten:

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.

Clapping and Lights example

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.

Turtle library

Comparison of fill screen and draw rectangle

Challenge 1: Build a program with different lighting levels controlled by clapping your hands.


Solution to challenge 1


© von Citilab Edutec 2019-2022.
This work is licensed under a CC-BY-SA 4.0 license.