"It’s Here! The BFCM Sale of the Year – Grab Your Favorites!"

Make an Intruder Detection with Micro:bit

This article is from tinkercademy, you can see the link here :

 https://tinkercademy.com/tutorials/plant-monitoring/

Swiper no swiping! Stop burglars with this simple intruder detection system.

Step 0 – Pre-build Overview

In this project, we are going to create an intruder detection system which will sound when someone opens the door. The status of the house will be displayed on the OLED.

Materials:

1 x BBC micro:bit

1 x Micro USB cable

1 x Breakout board

1 x Crash Sensor

1 x OLED

1 x Buzzer

2 x Female-Female jumper wires

2

Goals:

Get to know the Crash Sensor, OLED and Buzzer Make something with a OLED Make something with a Crash Sensor

Step 1: Components

3

Insert the micro:bit into the Breakout Board and plug in the micro USB cable, then connect the buzzer using the jumper cables. Connect the buzzer mocule to Pin 0.

4

Plug in the OLED as shown in the picture above. You should be able to plug it into any of the three rows.

5

Plug in the crash sensor to Pin 1. Make sure the colour of the wire follows the coloured pins on the breakout board.

Step 2: Pre-coding

We will add a package of code to enable us to use our kit components. Click on Advanced in the Code Drawer to see more code section and look at the bottom of the Code Drawer for Add Package.

0

This will open up a dialog box. 

Input “Tinker” in the search column and then choose “tinkercademy-tinker-kit” to add this package. Note: If you get a warning telling you some packages will be removed because of incompatibility issues, either follow the prompts or create a new project in the Projects file menu.

Step 3: Coding

Click on Tinkercademy inside the Code Drawer to find our custom blocks for the various components in your kit.

You should always initialize the OLED at the beginning. 64 and 128 represent the height and width of the OLED respectively.

Since there are only two conditions, we need only one “else-if”statement. When crash sensor is triggered, the buzzer will sound and the OLED will display the message “Intruder Detected”. Or else, if there is no force is applied to the crash sensor, the buzzer will not sound and the OLED will display the message “The house is safe”.

Step 4: Success!

Voilà! You have created a intruder detector!

Leave a Reply

images
In March, ELECFREAKS supported 5 schools to carry out school science and technology festival activities
images
Children’s Programming Education is the Future Trend
images
Technical verification! Nezha series products can complete WRO competition tasks
images
Let's take part in the Ceremony of the New Factory of ELECFREAKS together!
images
Bluetooth Bee(HC-05 and HC-06) User Guide
images
In March, ELECFREAKS supported 5 schools to carry out school science and technology festival activities
Monthly Archive