Wirelessly Controlled Humanoid

Example Description
Learn about humanoid robots, their form and functionality, and how the program uses arrow keys to control humanoid movement in different directions and speed.

Introduction

A humanoid is a type of robot or artificial system that is designed to resemble a human being in its form and functionality. Humanoid robots are typically equipped with sensors, actuators, and artificial intelligence capabilities that enable them to interact with their environment and perform tasks that are similar to those of a human being. Humanoid robots are used in various fields, including robotics research, entertainment, healthcare, education, and customer service.

Logic

The Humanoid will move according to the following logic:

  1. When the “UP” key is pressed – Humanoid will move forward.
  2. When the “Down” key is pressed – Humanoid will move Backward.
  3. When the “Left” key is pressed – Humanoid will turn left.
  4. When the “Right” key is pressed – Humanoid will turn Right.

Code

The program uses the up, down, left, and right arrows to control the robot and make it move forward, backward, left, and right. Every time you press one of the arrows, Humanoid will move in the direction you choose.

  1. First, we initialize the humanoid extension by dragging and dropping it onto the block we want to use for the humanoid.
  2. Then, we initialize the IF-ELSE block from the control palette.
  3. Here, we use the logic that if the up arrow key is pressed, the humanoid will move forward one step at a specific speed.
  4. If the down arrow key is pressed, the humanoid will move backward one step at a specific speed.
  5. When the right arrow key is pressed, the humanoid will move in the right direction one step at a specific speed using do() motion () times at () speed.
  6. If no key is pressed, the humanoid will return to its home position.

Output

Table of Contents