Room Defender
Let GoPiGo defend your room from unauthorized intruders.
7. Testing
Let’s verify that everything is working, before sending our Guardian off to do its job.
Start by putting GoPiGo on its back so it won’t run off when it detects an intrusion. Be careful not to hurt the ultrasonic sensor or the camera when you do this.
Place an obstacle in front of the ultrasonic sensor, less than 10 cm or 4 inches away.
Launch the script.
- Scratch: click the green flag in Scratch
- Python:
Remove the obstacle in front of the ultrasonic sensor. There should be plenty of space in front of it now, enough to trigger the attack mode.
Are you getting the appropriate reactions?
- Yelling can be heard through the speaker
- A loud noise comes out from the buzzer
- A photo is taken, it is saved to your Pi Desktop
- The two LEDs on the GoPiGo blink
- The wheels on the GoPiGo turn (and if the GoPiGo wasn’t on its back, it would be going forward)