X
Home > Blog > STEM for Arduino > HOW to Make a Track Alarm with KidsIOT

HOW to Make a Track Alarm with KidsIOT

By r December 6th, 2024 48 views
Track alarm ensures security by detecting pressure. It will remind host when detecting tracks to ensure the safety and property.
In this experiment, we adopt a 8x8 dot matrix and a thin film pressure sensor to form a track alarm. When someone is detected stepping on the sensing area, the dot matrix displays a footprint pattern as a reminder.

Flow

4301

Assembly

line1

Required Parts

Place the pressure sensitive area of the sensor on a firm, flat surface when in use. For details, please refer to Chapter 3.6.

43_00

line1

Step 1

43_01

line1

Step 2

43_02

line1

Step 3

43_03

line1

Step 4

43_04

line1

Step 5

43_05

line1

Step 6

43_06

line1

Step 7

43_07

line1

Step 8

43_08

line1

Step 9

43_09

line1

Completed

43_10

line1

Wiring Diagram

4302

Test Code

Open KidsBlock and connect the board to your computer. Click File –> Load from your computer.

3111

Choose D:\Code\2.Code_kidsIOT to open 4.3Track alarm.sb3 file.

4303

Click Unconnectedto connect to port and then 2210.

Explanations

5top

Conceive:

When someone steps on the pressure sensing area of the sensor, the output analog value of the sensor will decrease.

Set a threshold first to determine whether there is pressure. When the output value is smaller than the threshold, someone steps on this area; If the value is greater than the threshold, no track is detected.

If pressure is detected, a footprint icon will be displayed on the dot matrix.

4306

line2

Build blocks:

  1. Initialization: initialize the dot matrix and set the pin of the thin film pressure sensor.

    4304

  2. Loop.

    Determine whether the output analog value is smaller than 3000 (if yes, tracks are detected).

    • analog value < 3000: the dot matrix shows a footprint icon as a reminder.

    • analog value ≥ 3000: the dot matrix displays nothing.

    4305

5bottom

Test Result

4top

After uploading code, press the thin film with your finger, and you will see the dot matrix shows a footprint.

4303

4bottom

FAQ
10top
Q: After uploading the code, nothing shows on the matrix when the thin film is pressed?
A: ① The pressure value may be not reach the threshold, so please set a smaller one. ② Try again after pressing the reset button.
10bottom
HOW to Make an Invasion Alarm with KidsIOT
Previous
HOW to Make an Invasion Alarm with KidsIOT
Read More
Comprehension! HOW to Monitor Smart Home Environment with ESP32
Next
Comprehension! HOW to Monitor Smart Home Environment with ESP32
Read More
Message Us