Spy Robot
Key Objectives
In this lesson, you will:
- Build a LEGO model
- Connect your model to your device
- Program the Motion Sensor to detect motion
![spy-robot-image](https://assets.education.lego.com/v3/assets/blt293eea581807678a/blt93563c897a1049c8/5ebea0879b2ffb61d5c72e9b/spy-robot-image.png?locale=en-us&auto=webp&format=jpeg&width=1800&quality=90&fit=bounds)
Explore
1. Introduction
Max and Mia want to throw a surprise party for a friend.
They do not know when the friend will come to their house.
They need a device to warn them.
They want to build a spy robot.
Max and Mia need your help!
![spy-robot-connect-image](https://assets.education.lego.com/v3/assets/blt293eea581807678a/blt2785d67e5204b84a/5ebea099f11f7e3ed6d3fc53/spy-robot-connect-image.png?locale=en-us&auto=webp&format=jpeg&width=1800&quality=90&fit=bounds)
Create
2. Build your model
![spy-robot-instructions-preview](https://assets.education.lego.com/v3/assets/blt293eea581807678a/bltc0989c477ece2f02/5ebea09701e8fa22fb72ed19/spy-robot-instructions-preview.png?locale=en-us&auto=webp&format=jpeg&width=1800&quality=90&fit=bounds)
3. Connect your model to your device
![connection-to-smarthub-guide-image](https://assets.education.lego.com/v3/assets/blt293eea581807678a/bltecc7bcfe0c5d96d4/5ebea088daab7c7c2a544c93/connection-to-smarthub-guide-image.jpg?locale=en-us&auto=webp&format=jpeg&width=1800&quality=90&fit=bounds)
4. Program your model
Make the robot play a sound when it detects motion.
- Create the program as shown.
- Explain to each other how the robot works.
![detecting-motion-program-final](https://assets.education.lego.com/v3/assets/blt293eea581807678a/bltb2f618acd6f18abb/5ebea089401560610eb6e507/detecting-motion-program-final.png?locale=en-us&auto=webp&format=jpeg&width=1800&quality=90&fit=bounds)
5. Help Max and Mia further (optional):
- Record your own sound and make the robot play it.
- Program the robot to do other things.
![investigate-more-image](https://assets.education.lego.com/v3/assets/blt293eea581807678a/bltdf0d4e304439a90d/5ebea087bdc37e61dc289079/investigate-more-image.png?locale=en-us&auto=webp&format=jpeg&width=1800&quality=90&fit=bounds)
Congratulation
You did it!
![celebration-screen-for-lessonplans-image](https://assets.education.lego.com/v3/assets/blt293eea581807678a/bltc950a0e8b36a3e8c/5ebea09b5b71b945b1203255/celebration-screen-for-lessonplans-image.png?locale=en-us&auto=webp&format=jpeg&width=1800&quality=90&fit=bounds)