Skip to content
This repository has been archived by the owner on Jul 11, 2024. It is now read-only.

Sensors

alienzhangyw edited this page Feb 10, 2020 · 2 revisions

Infrared alarm

BlockPi support many different kinds of single output digital sensors.

For example, a infrared trace sensor like this

can make an infrared alarm with a high-level trigger active buzzer:

PS: The IR sensor in this tutorial outputs 0 when it's blocked.

Passageway induction lamp

We can simulate a passageway induction lamp by using a light sensor, a sound sensor and a LED.

The lamp won't light up in the day when it's bright, but will light up for a few seconds when there is loud noise at dark night.

See the video below:

https://video.zhihu.com/video/1210300305264504832

PS: The sound sensor in this tutorial outputs 0 when there is loud sound, the light sensor outputs 0 when it's bright.

Backing-up indicator lamp

BlockPi also support HC-SR04 ultrasonic distance sensor. For example, you can use it to simulate a backing-up indicator lamp in a vehicle with a RGB LED.

See the video below:

https://video.zhihu.com/video/1210300741636005888