Case 21: Motorcycle Robot
Case Introduction
Use Nezha Pro Sport Kit to build a two-wheeled motorcycle robot, adopting the classic layout of rear-wheel motor drive + front-wheel steering gear to simulate the movement logic of a real motorcycle. By programming to control the motor speed and steering gear angle, basic functions such as forward movement, steering, and speed regulation are realized, helping learners understand the mechanical linkage principle of "power system + steering system", master the basic control methods of motors and steering gears, and experience the complete engineering process from mechanical construction to programming and debugging.

Teaching Preparation
| Name | Graphic |
|---|---|
| Nezha Pro Sport Kit | ![]() |
Teaching objectives
Mechanical transmission: Understand the motorcycle movement principle of "rear-wheel drive + front-wheel steering" and master the mechanical installation method of motors and servos.
Control technology: Learn to set the motor speed (PWM adjustment) and servo angle through programming to achieve straight-line driving and steering operations.
Programming logic: Master the control process of "input command → main control board processing → actuator action" and understand the application of conditional statements (such as if) in motion control.
Interdisciplinary integration: Combine physics (gear transmission ratio), engineering (structural stability), and programming (modular control) knowledge to cultivate system integration capabilities.
Course introduction
How does the referee judge the goal in a basketball game? If you practice by yourself, how can you quickly know how many goals you have scored?
Can the basket "count" the number of goals by itself? Scene introduction: "Today we are going to equip the basket with an 'intelligent brain'! When the basketball passes through the basket, the collision sensor will immediately 'see' the goal like a referee, and the main control board will immediately record the number and display it on the screen. Whether you are practicing shooting or competing with classmates, this counter allows you to focus on sports and let technology handle the data!"
Learning and Exploration
Explore the relationship between motor speed and robot driving speed, analyze the influence of steering angle of servo on turning radius, and study how to improve driving stability by adjusting the front and rear wheelbase.
