*Project: Bark Patrol - Bittle X is standing up and sits down/barks if you gesture Bittle X to sit down.

Table of Contents

Video Tutorial with Petoi Coding Blocks to Illustrate the Workflow Tutorial

Thinking About the Task

Initial Setup

Gesture sensor official tutorial:

https://docs.petoi.com/block-based-programming/petoi-coding-blocks#get-the-gesture-value

Documentation on Gesture sensors:
https://docs.petoi.com/extensible-modules/gesture-sensor

Let’s Code!

The goal is to make bark Patrol - Bittle X is standing up and sits down/barks if you gesture Bittle X to sit down.

Code Block: Get Gesture Sensor

Using this code block, we can obtain the gesture values.

The gesture values are:

0: Up;
1: Down;
2: Left;
3: Right;

We can use the gesture values as a trigger for causing Bittle X to do specific skills.

For example:

Using the gesture values, where 0 is waving the hand upward:

Moving the hand upward will cause Bittle X to cheer.

Set up the following code:

In this code, this shows that:

Project Takeaways

You-Try: