Learn Programming with CyberPi: Interactive Sensor Games with CyberPi
🎲 Interactive Sensor Games – Shake, Tilt & Shine with mBot2! 🎲
In this lesson, students explore three different sensors on the CyberPi to create fun, interactive mini-games. By pressing the joystick button, they can switch between modes: shake the robot, tilt it in different directions, or shine a light to trigger reactions.
Perfect for classrooms, STEM clubs, or at-home learning, this pack includes student-friendly slides designed for interactive, build-as-you-go coding practice:
- ✅ Clear, step-by-step instructions with visuals
- ✅ Slides that explain why each block matters
- ✅ Fun “Try It Yourself” challenges for fast learners
What students will learn:
- How to use the accelerometer to detect shaking strength
- How to sense tilt directions (forward, backward, left, right)
- How to read ambient light intensity with the light sensor
- How to use joystick presses for mode selection
- Structuring programs with custom blocks (functions)
- Using loops and if/else logic to build interactive programs
By the end, students will have built a program that switches between three interactive sensor-based games — each one reacting to movement or light in a unique way!
📦 Includes:
- ✅ PDF lesson slides
- ✅ Full solution .mblock program for teacher’s reference
- ❌ No starter code needed - students build from scratch in mBlock!
Switch between three fun sensor games with your mBot2! 🎮 This lesson pack teaches students how to use the accelerometer and light sensor to build Shake, Tilt, and Flashlight modes - all controlled by the joystick. Includes step-by-step slides, challenges, and a full solution program - perfect for classrooms or at-home learning.