Sensors

Sensors

来自 Citilab Edutec

Boards
主板:

Citilab ED1

Component/s
配件:

无需配件
This activity is part of the Citilab Course. Check it out!

Sensors

Sensors and relational operators

  • In addition to the buttons, the ED1 board incorporates different sensors: light, temperature, tilt, etc.

ED1 Sensors

  • Given that these sensors give an analog value (that is, numerical) we will have to use relational blocks if we want to execute actions related to it.

Operators

  • These blocks also return a true or false value, so they can be used with the conditional blocks we saw earlier.

Light Threshold

Challenge 1: Show two different patterns on the screen by covering and uncovering the light sensor

Challenge

Solution to challenge 1

Temperature sensor

  • Another sensor integrated into the board is the temperature sensor.

  • A very simple example that can be done is to add to the graph the value that the sensor gives us every X time (for example 1 second) to visualize it comfortably.

Temperature graph

  • We can even export the data in .csv format and open it with a spreadsheet program (MSOffice, LibreOffice, etc.)

Export CSV

CC-BY-SA

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