Case 11 Tumbler
Introduction
This course aims to teach students how to use programming commands to control XGO Rider to perform periodic left and right shaking movements. Through the study of this course, students will master how to set the time period and how to achieve the left and right shaking of XGO Rider through programming, thereby enhancing its dynamic expression and interactivity in various application scenarios.
Teaching objectives
Understand the basic principles of periodic motion.
Learn the programming commands to control XGO Rider to perform periodic left and right shaking.
Master the method of setting the time period to achieve precise shaking control.
Teaching preparation
Before starting teaching, please make sure you have prepared the following necessary materials:
micro:bit V2 | |
---|---|
XGO-Rider | |
USB Cable | |
PC |
These materials will provide you with a complete experience and ensure that you can smoothly carry out subsequent operations and learning. If you are ready for the above, we can proceed to the next step.
After turning on the XGO Rider, in order to keep the fuselage balanced, it needs to move back and forth slightly. Please do not place the XGO Rider on the edge of the table or in a dangerous place to avoid damage.
Teaching process
Course introduction
Periodic motion is an important element in the dynamic performance of robots. It not only increases the fun of robots, but also provides an effective way of interaction in certain application scenarios. In this course, you will learn how to program the XGO Rider to shake left and right periodically, which will help you understand the role of time period in motion control and how to achieve precise motion control through programming.
Exploration Activities
- How does the robot achieve periodic left and right shaking?
- How to control the shaking period of XGO Rider through programming instructions?
- Can the smoothness and effect of shaking be optimized by adjusting parameters?
Start Programming
Add XGO Rider Software Library
1. Go to "makecode.microbit.org" and click New Project.
2. Enter the project name in the pop-up window and click Create.
3. Click Extension in the code drawer, enter XGO Rider in the search box on the pop-up interface and click the search icon. Click it after the XGO Rider software library is displayed.
Sample Program
Reference Program Link: https://makecode.microbit.org/_L0i3AdMmxLpC
Because XGO Rider has forward and backward movement in the performance mode, please place XGO Rider on a spacious flat ground.
Download Program
1. Use a USB cable to connect PC and micro:bit V2.
2. After the connection is successful, a drive letter named MICROBIT will be recognized on the computer.
3. Click in the lower left corner and select Connect Device.
4. Click。
5. Click。
6. Select BBC micro:bit CMSIS-DAP in the pop-up window, and then select Connect. At this point, our micro:bit has been successfully connected.
7. Click Download program.
Teamwork and Presentation
Students are divided into groups to jointly complete the programming of the XGO Rider's periodic left and right shaking.
Encourage students to cooperate, communicate and share experiences with each other.
Each group has the opportunity to show their programmed XGO Rider to other groups and demonstrate.
Expected results:
Summary and reflection
Review the course content and remind students what knowledge and skills they have mastered?
Guide students to discuss the problems and difficulties they encountered during the production process and how to solve these problems.
Guide students to think and discuss together how to achieve periodic motion control more effectively.
Expand knowledge
Periodic motion control is an important aspect of robot dynamic behavior design, which involves precise time and space control of robot motion. In practical applications, this usually requires consideration of the robot's dynamic characteristics, sensor feedback, and environmental factors. By learning the control of periodic motion, students can not only improve their programming skills, but also deepen their understanding of robot kinematics and control theory. In addition, modern robotics technology often combines advanced algorithms, such as PID control, to achieve more stable and precise motion control.