Explorer: Interactive pet

The lesson shows how to control the eXperiBot with simple hand movements—like a robotic pet.

A Multisensor is mounted on the eXperiBot, and a hand is held over it.

Learn how to control your eXperiBot with simple hand movements. Like a robot pet that listens to you.

Explorer, Smart Team 5. to 8. Easy

Model solutions

Unit 1

No program code is required for this unit. You must simply prepare the eXperiBot to start, which means:

  • Assemble the eXperiBot completely

  • Establish a connection to the app

Unit 2

Model solution: Unit 2 (Interactive pet)

Solution file to download and import into the eXperiBot Blockly app.

Lesson contents

Unit 1

Assemble your eXperiBot.

The assembled eXperiBot.
Step 1

Connect your eXperiBot to the app.

Proceed as follows:

  1. Switch on your eXperiBot.

  2. Then press the “Connect” button at the top right of the screen. Follow the instructions to connect your eXperiBot to the app.

A green button labelled with “Connect”.
The “Connect” button
The Powerbrain’s control panel with a blue status LED.
The Powerbrain’s status LED lights up blue. Your eXperiBot is connected to the app.
Step 2
The assembled eXperiBot. The Powerbrain’s status LED lights up blue.

You’ve assembled your eXperiBot and connected it to the app—now you’re ready to go!

Step 3

Unit 2

You have already familiarized yourself with the Multisensor in the lessons “Follow line”, “Recognizing colors", and “Avoid obstacles”. There, you learned how the sensor measures brightness, recognizes colors, and detects objects.

This enables your eXperiBot to be a line follower, distinguish colors, and avoid obstacles.

Illustration of the Multisensor

But the Multisensor can do even more: it can also measure the distance to an object or obstacle.

Knowledge update: the Multisensor as a distance meter

The Multisensor measures distances using invisible infrared light (IR light).

The sensor emits IR light. When this light hits an object, the sensor receives the reflection.

The sensor outputs a value between 0 and 100:

  • 0: Object is very close.

  • 100 indicates that the sensor has detected no object or that the object is too far away.

The sensor excels at detecting distance changes in the range of approximately 10 cm to 30 cm.

  • If a lot of IR light bounces back, the object is close.

  • If little or no IR light bounces back, the object is farther away or outside the measuring range.

Attach a Multisensor at the top of the eXperiBot in the direction of travel.

The image shows how to assemble the eXperiBot. On the left, you can see a black cylindrical part, the Multisensor. A green arrow indicates where you should attach the Multisensor to the eXperiBot. On the right, you can see the finished robot with two large Wheels, white and red cube-shaped modules, and the new black Multisensor.
Step 1

Program your robot pet.

Your eXperiBot should recognize your hand and react to it:

  • If the distance between your eXperiBot and your hand is less than 10 cm, then your eXperiBot moves forward.

  • Otherwise, it turns in a circle.

To make your eXperiBot respond correctly, you need a block from the “Logic” category.

Add a suitable block to your program.

Tip 1

Execute the statement “drive forward” only if the condition “your hand is less than 10 cm away” is true.

If this condition is false, your eXperiBot should spin in place.

Tip 2

You already learned about this block in the “Follow line” lesson.

The block only executes a statement if the condition is true.

Solution

This block allows your program to make a decision.

  • if …

    Here, your program checks a condition. The condition can only be true or false.

  • do …

    If the condition is true, then your program executes this part.

  • else …

    If the condition is false, then your program executes this part.

Step 2

Before you insert the appropriate condition into your Conditional, consider the following questions:

  • When should your eXperiBot move forward?

Solution

If the distance between your hand and the Multisensor on your eXperiBot is less than 10 cm.

  • How can you express this condition mathematically?

Solution

Distance < 10 cm

Now create a suitable condition. Proceed as follows:

  1. Select the appropriate block from the “Logic” category.

  2. Select a block for distance measurement from the “Multisensor” category.

  3. Select a number block from the “Math” category and adjust the number.

  4. Insert the two blocks from steps 2 and 3 into the block from step 1.

Step 3

If the Multisensor measures a distance of less than 10 cm to your hand, your eXperiBot should move forward.

Select a command from the “Motor” category. Your eXperiBot should execute this command when the condition is true. Insert the command into the block as appropriate.

Tip

Your program could may look like this:

Step 4

If you remove your hand or the distance is greater than 10 cm, your eXperiBot should turn in a circle on the spot.

Select a second statement from the “Motor” category. Your eXperiBot should execute this statement if the condition is false, in other words, if it is not true. Insert the statement into the “if-else” block.

Tip

This block makes your eXperiBot turn on the spot.

Step 5

If you want to control your eXperiBot for as long as you like with your hand movement, you must repeat this sequence infinitely.

Therefore, insert a suitable block from the “Loops” category into your program.

Tip

Consider where you need to insert the Loop into your program. Repeat the entire Sequence.

Step 6

Test your program.

A green, oval button. The button has white lettering that reads, “Run program.”

Pay close attention:

  • Does your eXperiBot turn in circles when your hand is more than 10 cm away from the Multisensor?

  • Does your eXperiBot immediately move forward again when your hand comes closer?

Tip—Does your eXperiBot spin around completely and not respond immediately to your hand?

This may be due to the degree setting.

This often happens when the degree setting in the rotation block is too high.

Reduce the degree setting. You do not need 360°.

The Loop causes your eXperiBot to repeat the rotation automatically until the Multisensor recognizes your hand.

Step 7

Your eXperiBot now responds to your hand movements.

A Multisensor is mounted on the eXperiBot, and a hand is held over it.
Step 8
eXperiBot Documentation eXperiBot Documentation Version 1.1.4 (Latest)
Made with by the eXperiBot Team © 2026 Cornelsen Experimenta GmbH