Skip to main content

Case 09 Follow the car at a fixed distance

Introduction

This course aims to guide students to learn the application of graphical programming and sensor technology by using Cutebot Pro intelligent racing car to make a case. Students will learn how to program a car to follow the car in front while maintaining a certain distance. In the process of achieving this goal, students will involve knowledge points such as judgment, branching, and logic operations of program design, and understand the working principle of ultrasonic sensors.

Teaching Objectives

Understand the principle and application of ultrasonic sensors.

Learn to use graphical programming tools to write programs to realize the function of following the car.

Teaching Preparation

Cutebot Pro × 1

micro:bit × 1

Teaching Process

Course Introduction

Hello everyone! Today we will use the Cutebot Pro smart racing car to make an interesting case. Have you guys seen this smart race car? It has ultrasonic sensors that help our car perceive its surroundings. Our goal is to allow the car to follow the car in front and keep a certain distance. This will require us to use graphical programming and sensor technology to achieve this.

Inquiry activities

How to use an ultrasonic sensor to detect obstacles ahead?

How to write a program to make the car follow the car in front and keep a certain distance?

Sample Code

Link:https://makecode.microbit.org/_YJcR3hfW68kC

You can also download the program directly from the following web page.

Teamwork and Presentation

Students are divided into groups to complete the production and programming of the car together.

Students are encouraged to collaborate, communicate and share experiences with each other.

Each team has the opportunity to present their smart car to the other teams.

Summary and Reflection

Review course content to remind students of what knowledge and skills they have acquired.

Guide students to discuss the problems and difficulties they encountered in the production process, and how to solve these problems.

Guide students to think about the applications of sensors that can be seen in the car life.