Controlling Lights with Hand Claps

Controlling Lights with Hand Claps

per Citilab Edutec

Boards
Plaques:

Citilab ED1

Component/s
Components:

Micròfon
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.

Challenge

Solution to challenge 1

CC-BY-SA

© per Citilab Edutec 2019-2022.
Aquesta obra té una llicència CC-BY-SA 4.0.