02.
Basic programming
1.Focus
What is the difference between a robot and an
automatic machine?
1.Focus
Automatic machinery refers to
machines that operate
automatically and repeatedly
humanoid robot
according to instructions without
human intervention.
1.Focus
So what is a robot?
humanoid robot
We gave machines the power of a man, and made
them work like a man.
1.Focus
Take a look at our robot suit.
What are the three characteristics of the robot achieved by means of?
2.Explore
A robot is defined as a mechanical device
The sensors are
thatthe senses its
performs used byautomatically.
work robots to perceive the outside world;
The controller Just
is thelike
robot's decision-making
humans, robots have brain;
the ability to
sense information, process information, and
The motor is the actuator
output that the robot uses to do the action. Other actuators include
information.
the controller's own sound and emotion screen image output.
Of course, humans need to program it
Other structures are used to assist robots with different tasks with different
beforehand.
requirements.
2.Explore
As the brain of the robot, the controller can control the robot to
achieve different functions, but the controller is just like the
brain of a newborn baby, it is blank and can't do anything, so
we need to teach it to do things, 。
How can we teach it?
3.Create
Programming is telling the controller what we
want it to do and how we want it to do it, in a
way that the controller can understand.
So now we're going to learn about the Scratch
programming software, and we're going to use
Scratch programming to tell the controller what
we want it to do.
Step one, open the whale programming
software.
3.Create
1. Create and save programs to form the habit of
saving programs
2. Program download. After the program is completed,
we need to download the program to the controller and
run it
3. Module library. Various functional modules on the left
are commands that we can call directly in programming
to achieve complex functions through the combination
of various commands.
3.Create
For this class we need to design a simple robot.
We need to design robots that can turn their bodies and make sounds.
3.Create
3.Create
3.Create
3.Create
3.Create
3.Create
3.Create
3.Create
3.Create
3.Create
3.Create
3.Create
3.Create
3.Create
3.Create
Please connect the two motors to ports A and B of the controller
respectively using the connecting wire.
4.Code
What do you do first when you program a robot?
4.Code
The execution of the program needs to follow a
sequential structure, different commands are
executed from top to bottom.
We need to figure out the order in which we want
控制器上的接口除了传递信息还具有什么作用?
the robot to do things.
For this lesson, we need the robot to turn its head
for one second, then laugh, and finally wave its
arms.
4.Code
First we need to find these modules.
4.Code
Based on the sequential structure of our program,
how should we arrange our module commands?
4.Code
Through the above content we have completed a
simple robot, now we need to further enrich the
robot's functions.
控制器上的接口除了传递信息还具有什么作用?
We need to add new functions to the robot, now we
need to make the robot laugh, wave its arms, and
finally whistle.
4.Code
4.Evaluation
What is the basic structure that programs follow?
How does this structure work?
控制器上的接口除了传递信息还具有什么作用?
5.Evaluation
Sequential structure.
Simply order the corresponding modules in the order in
which they solve the problem, which is executed from top
控制器上的接口除了传递信息还具有什么作用?
to bottom
6.Show
Project summary:
Today, we successfully built a simple robot.
Project summary: Today, weand
By programming successfully
downloadingbuiltthe
a simple robot.
program By programming and downloading the program to
to the
the controller, we canwe
controller, control the rotation
can control of single
the rotation motor motor
of single and double motor, and make sound with the controller.
and double motor, and make sound with the
controller.