Buy from USA | Buy from UK | Buy from DE | Buy from IT | Buy from FR | Buy from ES | ここでご購入を! |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
![]() |
In this project, we will use a PIR motion sensor to detect human movement, once an intruder’s motions is detected, then Pico will trig a buzzer alarm. This is a typical application used in many home security system.
In above circuit graph, you can see that:
PIR sensor VCC pin connected to VBUS(5V)
PIR sensor GND pin connected to GND
PIR sensor OUT pin connected to GP15
buzzer I/O pin connected to GP14
1)Click New Project icon, you will see a My project icon with a fancy name will pop up.
2)Click the new icon in My Projects
Now you will enter a new graphic programming page. Please click CONNECT Button in the bottom of the page and connect your Pico board to your project.Then your browser will pop up a Serial Port option menu, please select Pico from the menu and click Connect button
If you can not see Pico in the Serial Port menu, it means your Pico is not setup properly. You need go back to Lesson 1 Step 1 and setup Pico again.
After you connect Pico to Serial Port, your GUI Connect button will switch to Disconnect button as following:
1)Click Chip -> Start , then move Start chip to coding area as following :
2)Click Loops -> repeat while true and move this block just below start block as following:
8) From Logic category, add an if_do_else block inside repeat while block as following:
9)From Chip category, add a is_pin_0_LOW block to if area and change pin 0 to pin 15, LOW to HIGH, as following:
10)From Chip category, add turn pin ON block to do area and else area, then change pin number from 0 to 14, change do area value from ON to OFF as following:
11)Add turn pin ON block again to do area and else area , then change pin number from 0 to 14 as following:
11): From Chip category, add a Wait 1 seconds block below outer if do else block, change wait time from 1 to 0.2 , as following:
Now we have finished building the program, we can click START button to run the program.
When you put your hand close the PIR sensor, it means some intruder is detected, buzzer will alarm. If you remove your hand from the PIR motion sensor, buzzer will stop alarm.
DownLoad Url osoyoo.com