Elecrow on-line store, make your making easier.
https://www.elecrow.com/
Material:
Micro:bit
x1
Crowtail- Base Shield for Micro:bit
x1
Crowtail- RTC
x1
Crowtail- Buzzer
x1
First, you should add the package:
https://github.com/robotfreak/pxt-ds1307
Lesson18.Anti-theft Device
We also see some infrared security in the movie, in this lesson will teach you use microwave to
built a Anti-theft device, if someone enter the detection area, the alarm will sound. Connect the
Crowtail- Microwave Sensor to P1 interface, connect the Crowtail- Buzzer to P0 interface.
Material:
Micro:bit
x1
Crowtail- Base Shield for Micro:bit
x1
let
minutes =
0
let
hour =
0
hour =
Time
.
getTimePart
(DateTimePart.Hours)
minutes =
Time
.
getTimePart
(DateTimePart.Minutes)
if
(hour ==
8
&& minutes ==
0
) {
pins
.
digitalWritePin
(DigitalPin.P1,
1
)
basic
.
pause
(
20000
)
}