• Home
  • PictoBlox Blocks
  • set pins FR Hip () FL Hip () FR Leg () FL Leg() BR Hip () BL Hip () BR Leg () BL Leg ()

set pins FR Hip () FL Hip () FR Leg () FL Leg() BR Hip () BL Hip () BR Leg () BL Leg ()

Description

The block initializes the quadruped robot and maps the 8 servos to the specified pins. As the default, the servo motors should be connected to the following pins:

  1. Front Right Hip – Servo Pin 4
  2. Front Left Hip – Servo Pin 1
  3. Front Right Leg – Servo Pin 8
  4. Front Left Leg – Servo Pin 5
  5. Back Right Hip – Servo Pin 3
  6. Back Left Hip – Servo Pin 2
  7. Back Right Leg  – Servo Pin 7
  8. Back Left Leg – Servo Pin 6
Alert: If the connection is not done as specified, then you have to change the pin for code in this block.

Example

Introduction

Dance motion with humanoid refers to using a robot that has a human-like appearance to perform dance movements. These robots are pre-programmed with various dance sequences and can also be customized to create unique dance routines.

To make the robot move, we need to use code to control its motors and servos. The code can be created using a programming tools/language such Pictoblox, Python, or Arduino. The code tells the robot which movements to make, such as lifting its arms, bending its knees, or spinning around.

Different actions can be used to create different dance moves, and the dance can be accompanied by music or sound effects. The robot can also be programmed to display different colors or patterns on its body as it moves.

Humanoid robots is a fun and creative way to explore the intersection between technology and the arts.

Code

Logic

  1. Here, we use the pre-defined dance and sequence of humanoid in our code.
  2. To begin, we first initialize the humanoid extension and set up all the required pins by dragging and dropping the necessary blocks.
  3. We use a forever loop to continuously play the dance sequence along with different sounds and display matrices.
  4. To make the dance sequence more interesting, we use different actions with the ‘do() action()() times() speed’ block. It’s quite fascinating.
  5. You can even try out your own dance movements by using different actions and adding your own creativity.

Output

Read More
Learn how to program a quadruped robot to perform predefined actions using PictoBlox.

Introduction

In this project, we will explain how to run predefined actions for Quadruped. By the end of the tutorial, learners will have gained knowledge and practical experience in programming a quadruped robot and controlling its movements using PictoBlox.

Quadruped Actions

There are seventeen predefined actions for Quadruped in PictoBlox which can be accessed through do () action () times at () speed block.

Code

Click on the green flag to run the motion sequence.

Controls for Action Block

Using the do () action () times at () speed block, we can control the number of times the action has to be executed.

Code

Logic

  1. To set up the quadruped, you can drag and drop pins for each leg and hip into the initialization block using set pins FR Hip () FL Hip () FR Leg () FL Leg() BR Hip () BL Hip () BR Leg () BL Leg () block.
  2. To make the quadruped perform a pre-defined action, you can use the drag and drop do () action () times at () speed block and specify the number of times to act and at what speed.
  3. You can also use the drag and drop wait()seconds block to make the quadruped wait for a specific number of seconds.
  4. To return the quadruped to its starting position, you can drag and drop the home position block.

Output

Read More
Learn how to use PictoBlox to control the predefined motions of the Quadruped robot.

Introduction

In this project, we will explain how to run predefined motions in PictoBlox for the Quadruped. The predefined motions allow users to make the robot move forward, backward, left, right, and much more.

Quadruped Motions

The are eight predefined motions for Quarky in PictoBlox which can be accessed through do () motion () times at () speed block. Using the do () motion () times at () speed block, we can control the number of times the motion has to be executed.

Testing Code


Click on the green flag to run the motion sequence.

Custome Speed Controls

We can also control the speed of the motion.

If you want to perform the motion at a different speed, then you can use a variable to define the speed.

Output


We can program a quadruped robot to move in predefined motions, such as forward, backward, left, and right

Code

Logic

  1. To initialize the quadruped extension, we need to set the pins for the FR Hip, FL Hip, FR Leg, FL Leg, BR Hip, BL Hip, BR Leg, and BL Leg blocks.
  2. To keep the program running infinitely, we can use the forever block.
  3. To execute predefined motions with specific speeds, we can use the do () motion () times at () speed block.
  4. To wait for a specific amount of time, we can use the wait () seconds block.

Output

Read More
Learn the steps required to create a Humanoid dance sequence. This guide covers a Humanoid robot and refining the sequence to create an engaging and entertaining performance.

Introduction

A Humanoid dance sequence is a set of programmed instructions that allows a Humanoid robot to perform a dance routine. Typically, these sequences involve a combination of movements and actions performed by the robot in a coordinated manner, to create an entertaining and engaging dance performance.

The process typically involves the following steps:

  1. Define the dance moves
  2. Sequence the moves
  3. Program the robot
  4. Test and refine

Creating a Humanoid dance sequence involves a combination of creativity, technical skill, and attention to detail, and can result in an engaging and entertaining performance that showcases the capabilities of robotic technology.

Code

Logic

  1. Drag and drop set pin RHip () Lhip () RFooot () LFoot () RHand () LHand() block from the Humanoid extension – This block is used to set the pins of the robot to control its movement.
  2. Initialize Humanoid will be in the home position – This means that at the start of the program, the Humanoid robot will be in its default position.
  3. Drag and drop forever loop for a continuous loop – This is a programming construct that ensures that the code inside the loop is executed continuously.
  4. The first display will have some light and then it will play sound and do some action for a specific time and specific speed – This is not explicitly described in the given code, but it could refer to displaying some LED lights and playing some sound effects as the robot performs a specific action, which could involve movement in a certain direction with a particular speed.
  5. Then drag and drop the repeat block to repeat the block for a specific time – This block is used to repeat a particular action a specific number of times or for a particular period with do() action() times at () speed block.
  6. Then drag and drop different actions for a specific time with a specific speed – This could refer to performing a series of different movements or actions, each with a specific duration and speed with do() action() times at () speed block.

Output

Read More
In this tutorial, you will learn how to control a quadruped robot using the arrow key program.

Introduction

In this example, we will make the computer program that controls a “quadruped” (a four-legged robot). It’s like a remote control car, except with four legs instead of four wheels. You can press different keys on the keyboard to make the quadruped move forward, backward, turn left and turn right.

Logic

The Quadruped will move according to the following logic:

  1. 32Quadruped will move forward when the “UP” key is pressed.
  2. Quadruped will move backward when the “DOWN” key is pressed.
  3. Quadruped will turn left when the “LEFT” key is pressed.
  4. When the “RIGHT” key is pressed – Quadruped 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, Quarky will move in the direction you choose for 1000 steps.

Output

Read More
Learn about face-tracking, and how to code a face-tracking Quadruped robot using sensors and computer vision techniques.

Introduction

A face-tracking robot is a type of robot that uses sensors and algorithms to detect and track human faces in real-time. The robot’s sensors, such as cameras or infrared sensors, capture images or videos of the surrounding environment and use computer vision techniques to analyze the data and identify human faces.
Face-tracking robots have many potential applications, including in security systems, entertainment, and personal robotics. For example, a face-tracking robot could be used in a museum or amusement park to interact with visitors, or in a home as a companion robot that can recognize and follow the faces of family members.

One of the most fascinating activities is face tracking, in which the Quadruped can detect a face and move its head in the same direction as yours. How intriguing it sounds, so let’s get started with the coding for a face-tracking Quadruped robot.

Logic

  1. If the face is tracked at the center of the stage, the Quadruped should be straight.
  2. As the face moves to the left side, the Quadruped will also move to the left side.
  3. As the face moves to the right side, the Quadruped will also move to the right side.

Code Explain

  1. Drag and drop the when green flag clicked block from the Events palette.
  2. Then, add a turn () video on stage with () % transparency block from the Face Detection extension and select one from the drop-down. This will turn on the camera.
  3. Add the set pins FR Hip () FL Hip () FR Leg () FL Leg() BR Hip () BL Hip () BR Leg () BL Leg () block from the Humanoid extension.
  4. Click on the green flag and your camera should start. Make sure this part is working before moving further.
  5. Add the forever block below turn () video on stage with () % transparency from the Control palette.
  6. Inside the forever block, add an analyzed image from the () block. This block will analyze the face the camera detects. Select the camera from the dropdown.
  7. Create a variable called Angle that will track the angle of the face. Based on the angle, the robot will move to adjust its position.
  8. Here comes the logical part as in this, the position of the face on the stage matters a lot. Keeping that in mind, we will add the division () / () block from the Operator palette into the scripting area.
  9. Place get () of the face () at the first place of addition () + (), and 3 at the second place. From the dropdown select X position.
  10. If the angle value is greater than 90, the Humanoid will move left at a specific speed. If the angle is less than 90, the Humanoid will move right at a specific speed. If the angle is exactly 90, the Humanoid will return to its home position.
Block Explained

  1. Create a variable called Angle and assign it the value of the face’s position.
  2. At the center of the stage, we will get the X position value which is zero.
  3. As we move to the left side the X position value will give you the negative value and as we move to the right side the X position value will give you the positive value.
  4. The x position value is divided by 3 which gives precise positioning.
  5. To set the angle at 90 when the face is at the center of the stage we have added 90 to the X position value.
  6. As we move to the left side the angle value will get decreased as the X position value is going in negative.
  7. As we move to the right side the angle value will get increased as the X position value is going in positive.

Code

Output

Our next step is to check whether it is working right or not. Whenever your face will come in front of the camera, it should detect it and as you move to the right or left, the head of your  Quadruped robot should also move accordingly.

Read More
Learn how to create a crawling motion with a quadruped robot using individual servo control.

Introduction

The project demonstrates how to make the crawling motion with Quadruped using individual servo control.

Logic

For this project, we are using the set servos () () () () () () () () at () speed block that sets the servo motors of the quadruped to the specified angles at the specified speed.

There are four positions of the robot we are going to make to create the crawling motion:

  1. Position 1


  2. Position 2
  3. Position 3
     

  4. Position 4

Code

Output

Read More
Learn how to set the bounding box threshold, and detect signals such as 'Go', 'TurnRight', 'TurnLeft', and 'Stop' to control quadruped movements.

Introduction

A sign detector Quadruped robot is a robot that can recognize and interpret certain signs or signals, such as hand gestures or verbal commands, given by a human. The robot uses sensors, cameras, and machine learning algorithms to detect and understand the sign, and then performs a corresponding action based on the signal detected.

These robots are often used in manufacturing, healthcare, and customer service industries to assist with tasks that require human-like interaction and decision-making.

Code

Logic

  1. Then, it sets up the quadruped robot’s camera to look for hand signs and tells it how to recognize different signs.
  2. Next, the code starts a loop where the robot looks for hand signs. If it sees a sign, it says the name of the sign out loud.
  3. Finally, if the robot sees certain signs (like ‘Go’, ‘Turn Left’, ‘Turn Right’, or ‘U Turn’), it moves in a certain direction (forward, backward, left, or backward) based on the sign it sees.
  4. So, this code helps a robot understand hand signs and move in response to them!

Output

Read More
Learn about how hand gestures and motions can be translated into commands that control the movement of objects.

Introduction

The hand-controlled motion refers to the ability to control the movement of an object using hand gestures or motions. This can be accomplished through the use of various technologies, such as sensors or motion tracking devices, that detect the movements of the hand and translate them into commands that control the motion of the object.

Hand-controlled motion has a wide range of applications, including in virtual reality and gaming, robotics, prosthetics, and assistive technologies for individuals with disabilities. By allowing for intuitive and natural control of motion, hand-controlled motion can enhance the user’s experience and increase their ability to interact with and manipulate the world around them.

Code

Logic

  1. Begin by initializing the Humanoid extension.
  2. Set specific values for the speed, left-hand offset, left-hand amplifier, period, and phase variable using set() to ().
  3. Then use a forever loop to continuously execute the necessary tasks.
  4. Furthermore, utilize the repeat until loop to repeat the tasks until a specific period has passed.
  5. Calculate a specific angle to set the current position, then position the right hand accordingly to start oscillating from that angle using the set() to () block.
  6. Then apply similar mathematical calculations and set the left hand to the same angle.
  7. Finally, Both hands will move by the calculations due to the forever loop.

Output

Read More
Discover how the Quadruped robot can detect and respond to the presence of a hand in its environment.

The project demonstrates how to make the Quadruped detect the hand in front of it and move according.

Type 1 – Forward Backward

The logic is simple. If the distance measured from the ultrasonic sensor is less the robot will move toward the hand. Else the robot will lean backward.

Code


Type 2 – Upside Down

If the distance measured from the ultrasonic sensor is less the robot will face upwards towards the hand. Else the robot will look downward.

Code


Read More
Learn how to use Pose Classifier, an extension of ML Environment. Follow the step-by-step tutorial on using image classifier in block coding.

Introduction

The pose Classifier is the extension of the ML Environment used for classifying different body poses into different classes.

The model works by analyzing your body position with the help of 17 data points.

Pose Classifier Workflow

  1. Open PictoBlox and create a new file.
  2. You can click on “Machine Learning Environment” to open it.
  3. Click on “Create New Project“.
  4. A window will open. Type in a project name of your choice and select the “Pose Classifier” extension. Click the “Create Project” button to open the Pose Classifier window.
  5. You shall see the Pose Classifier workflow with two classes already made for you. Your environment is all set. Now it’s time to upload the data.

Class in Pose Classifier

Class is the category in which the Machine Learning model classifies the poses. Similar posts are put in one class.

There are 2 things that you have to provide in a class:

  1. Class Name: The name to which the class will be referred.
  2. Pose Data: This data can be taken from the webcam or uploaded from local storage.
Adding Data to Class

You can perform the following operations to manipulate the data into a class.

  1. Naming the Class: You can rename the class by clicking on the edit button.
  2. Adding Data to the Class: You can add the data using the Webcam or by Uploading the files from the local folder.
    1. Webcam:
  3. We use two classes, “up” and “down,” in our code, as depicted in the picture.
Training the Model

After data is added, it’s fit to be used in model training. To do this, we have to train the model. By training the model, we extract meaningful information from the hand pose, and that in turn updates the weights. Once these weights are saved, we can use our model to predict previously unseen data.

The accuracy of the model should increase over time. The x-axis of the graph shows the epochs, and the y-axis represents the accuracy at the corresponding epoch. Remember, the higher the reading in the accuracy graph, the better the model. The range of accuracy is 0 to 1.

Testing the Model

To test the model, simply enter the input values in the “Testing” panel and click on the “Predict” button.

The model will return the probability of the input belonging to the classes.

Export in Block Coding

Click on the “Export Model” button on the top right of the Testing box, and PictoBlox will load your model into the Block Coding Environment if you have opened the ML Environment in the Block Coding.

Code Explanation

  1. First, select the Humanoid extension from the palette.
  2. Drag and drop the “forever” block to create a continuous loop.
  3. Drag and drop the “if” and “else” blocks from the control palette. If the upper-class hand is detected in a pose, the Humanoid will move its left hand to 180 degrees and its right hand to 0 degrees, imitating a human-like pose.
  4. If the “down” class is indicated on the screen, PictoBlox will prompt saying “down” and the Humanoid will move its left and right hand to mimic a human pose, with a rotation of 90 degrees each.
  5. Otherwise, the Humanoid will assume a home position, remaining still with no movement.

Code

Logic

  1. The first model is used to identify the pose of a human, presumably using pose estimation techniques.
  2. Two classes, “up” and “down,” are added to represent the different angles of a person’s hand position.
  3. The model is trained using labeled data to learn to predict the class (up or down) based on the input image or video frame.
  4. The trained model is then used to predict the class of an image or video frame captured from a webcam, indicating the current position of the person.
  5. The code includes an if-else condition to handle the predicted class. If the model identifies the person’s pose as “up,” the Humanoid will mimic the same position and angle of the person’s hand.
  6. If the model identifies the person’s pose as “down, the Humanoid will set its hand angle to a down position.

Output

Read More
Learn how oscillators are utilized to create seamless movements in Quadruped robots.

Introduction

In this example, you will understand how the oscillator concept is used to create smooth motions for the Quadruped robot. The oscillator is the primary component for making the smooth movements of Quarky Quadruped like walking or turning.

How does the Oscillator work?

The purpose of the oscillator in the code is to generate a sinusoidal waveform that can be used to control the motion of a servo motor. The parameters of the oscillator are defined by the offset, amplitude, period, and phase difference.

  1. Offset: The offset is the starting angle of the servo motor (oscillator). It is the angle at which the servo motor starts moving.
  2. Amplitude: The amplitude of the servo motor (oscillator) is the maximum angle the servo motor can rotate.
  3. Period: The period is the total time taken by the oscillator to complete one full cycle.
  4. Phase Difference: The phase difference is the angular displacement of the oscillator from its starting point.

In mathematical terms, the servo angle is calculated using the following formula:

Angle = Offset + Amplitude * sin(Time / Timeperiod + Phasediff)

Single Servo Oscillation

Let’s apply the concept of oscillation to the Quadruped. We want the front right hip servo to oscillate like this:

As you can observe, the following are the oscillator parameters that can be used to get the desired motion:

  1. Offset: 45 degrees
  2. Amplitude: 45 degrees
  3. Time period: 1000
  4. Phase Difference: 0 degrees

Look at the parameters carefully and see if you can understand how it works.

Now to execute the following on Quarky, we will the set () amplitude () offset () period () phase difference () which sets the oscillator parameters for the selected servo motor.

Next, we will use oscillate for cycles () block to execute the oscillator for the complete cycle for the specified cycle times.

Create the following script:

Click on the green flag to test the script:

As you can observe the servo motor start from 45 degrees and do 1 oscillation. You can observe the servo angle here:

Single Servo Oscillation with Phase Difference

Let’s see how to use the Phase Difference to delay the move.

Create the following script:

Click on the green flag to test the script:

As you can observe the servo motor start from 90 degrees and do 1 oscillation. You can observe the servo angle here:

Hope you have understood the oscillator. Let’s change the difficulty level and try the oscillator on all servo motors.

All Servo Oscillator

Create the script to make the left-right motion:

Let’s decode it. Let us play the motion while keeping the Quadruped in the air.

As you can observe the following movements: All the hip joints are starting from the 45-degree angles and then oscillate. The script of the following is here:

Run the green flag and test the code.

Try Other Oscillator Motions

  1. Code 1:
  2. Code 2:

Try to change the parameters and create your actions.

Read More
Learn how to create custom sounds to control Quadruped with the Audio Classifier of the Machine Learning Environment in PictoBlox.

Introduction

A Sound-Based Quadruped with Machine Learning refers to a Quadruped robot that can perceive and interact with its environment through sound-based sensing and uses machine-learning techniques to process and analyze the auditory data it receives.
Quadruped robots with machine learning have the potential to greatly enhance the way we interact with machines and each other, making communication more natural and intuitive while also enabling new applications in fields such as healthcare, education, and entertainment.
In this activity, we will use the Machine Learning Environment of the Pictoblox Software. We will use the Audio Classifier of the Machine Learning Environment and create our custom sounds to control the Quadruped.

Audio Classifier Workflow

Follow the steps below to create your own Audio Classifier Model:

  1. Open PictoBlox and create a new file.
  2. Select the Block coding environment as the appropriate Coding Environment.
  3. Select the “Open ML Environment” option under the “Files” tab to access the ML Environment.
  4. A new window will open. Type in an appropriate project name of your choice and select the “Audio Classifier” extension. Click the “Create Project” button to open the Audio Classifier Window.
  5. You shall see the Classifier workflow with two classes already made for you. Your environment is all set. Now it’s time to upload the data.
  6. As you can observe in the above image, we will add two classes for audio. We will be able to add audio samples with the help of the microphone. Rename class 1 as “Clap” and class 2 as “Snap”.

Note: You can add more classes to the projects using the Add Class button.

Adding Data to Class

You can perform the following operations to manipulate the data into a class.

  1. Naming the Class: You can rename the class by clicking on the edit button.
  2. Adding Data to the Class: You can add the data using the Microphone.
  3. You will be able to add the audio sample in each class and make sure you add at least 20 samples for the model to run with good accuracy.
  4. Add the first class as “clap”  and record the audio for clap noises through the microphone.
  5. Add the second class as “snap” and record the audio for snap noises through the microphone.

Note: You will only be able to change the class name in the starting before adding any audio samples. You will not be able to change the class name after adding the audio samples in the respective class.

Training the Model

After data is added, it’s fit to be used in model training. To do this, we have to train the model. By training the model, we extract meaningful information from the hand pose, and that in turn updates the weights. Once these weights are saved, we can use our model to make predictions on data previously unseen.

The accuracy of the model should increase over time. The x-axis of the graph shows the epochs, and the y-axis represents the accuracy at the corresponding epoch. Remember, the higher the reading in the accuracy graph, the better the model. The range of accuracy is 0 to 1.

Testing the Model

To test the model simply, use the microphone directly and check the classes as shown in the below image:

You will be able to test the difference in audio samples recorded from the microphone as shown below:

Export in Block Coding

Click on the “Export Model” button on the top right of the Testing box, and PictoBlox will load your model into the Block Coding Environment if you have opened the ML Environment in the Block Coding.

 

The Quadruped will move according to the following logic:

  1. When the audio is identified as “clap” sound– Quadruped will move forward.
  2. When the “snap” sound is detected –Quadruped will move backward.


Note: You can add even more classes with different types of differentiating sounds to customize your control. This is just a small example from which you can build your own Sound Based Controlled Quadruped in a very easy stepwise procedure.

Code

Logic

  1. First, initialize the Quadruped extension.
  2. Then, initialize a forever loop to continuously loop and analyze the camera from the stage.
  3. If the program detects a clap sound, the Quadruped will move forward at a specific speed.
  4. Similarly, if it identifies a snap sound, the Quadruped will move backward at a specific speed.
  5. Otherwise, the Quadruped will remain in its initial position (home position).

Output

Read More
Learn how to create custom sounds to control Humanoid with the Audio Classifier of the Machine Learning Environment in PictoBlox.

Introduction

A Sound-Based Humanoid with Machine Learning refers to a Humanoid robot that can perceive and interact with its environment through sound-based sensing and uses machine-learning techniques to process and analyze the auditory data it receives.

Humanoid robots with machine learning have the potential to greatly enhance the way we interact with machines and each other, making communication more natural and intuitive while also enabling new applications in fields such as healthcare, education, and entertainment.

In this activity, we will use the Machine Learning Environment of the Pictoblox Software. We will use the Audio Classifier of the Machine Learning Environment and create our custom sounds to control the Humanoid.

Audio Classifier Workflow

Follow the steps below to create your own Audio Classifier Model:

  1. Open PictoBlox and create a new file.
  2. Select the Block coding environment as the appropriate Coding Environment.
  3. Select the “Open ML Environment” option under the “Files” tab to access the ML Environment.
  4. A new window will open. Type in an appropriate project name of your choice and select the “Audio Classifier” extension. Click the “Create Project” button to open the Audio Classifier Window.
  5. You shall see the Classifier workflow with two classes already made for you. Your environment is all set. Now it’s time to upload the data.
  6. As you can observe in the above image, we will add two classes for audio. We will be able to add audio samples with the help of the microphone. Rename class 1 as “Clap” and class 2 as “Snap”.

Note: You can add more classes to the projects using the Add Class button.

Adding Data to Class

You can perform the following operations to manipulate the data into a class.

  1. Naming the Class: You can rename the class by clicking on the edit button.
  2. Adding Data to the Class: You can add the data using the Microphone.
  3. You will be able to add the audio sample in each class and make sure you add at least 20 samples for the model to run with good accuracy.
  4. Add the first class as “clap”  and record the audio for clap noises through the microphone.
  5. Add the second class as “snap” and record the audio for snap noises through the microphone.

Note: You will only be able to change the class name in the starting before adding any audio samples. You will not be able to change the class name after adding the audio samples in the respective class.

Training the Model

After data is added, it’s fit to be used in model training. To do this, we have to train the model. By training the model, we extract meaningful information from the hand pose, and that in turn updates the weights. Once these weights are saved, we can use our model to make predictions on data previously unseen.

The accuracy of the model should increase over time. The x-axis of the graph shows the epochs, and the y-axis represents the accuracy at the corresponding epoch. Remember, the higher the reading in the accuracy graph, the better the model. The range of accuracy is 0 to 1.

Testing the Model

To test the model simply, use the microphone directly and check the classes as shown in the below image:

You will be able to test the difference in audio samples recorded from the microphone as shown below:

Export in Block Coding

Click on the “Export Model” button on the top right of the Testing box, and PictoBlox will load your model into the Block Coding Environment if you have opened the ML Environment in the Block Coding.

 

The Humanoid will move according to the following logic:

  1. When the audio is identified as “clap”- Humanoid will move forward.
  2. When the “snap” sound is detected –the Humanoid will move backward.

Note: You can add even more classes with different types of differentiating sounds to customize your control. This is just a small example from which you can build your own Sound Based Controlled Humanoid in a very easy stepwise procedure.

Code

Logic

  1. First, initialize the Humanoid extension.
  2. Then, initialize a forever loop to continuously loop and analyze the camera from the stage.
  3. If the program detects a clap sound, the Humanoid will move forward at a specific speed.
  4. Similarly, if it identifies a snap sound, the Humanoid will move backward at a specific speed.
  5. Otherwise, the Humanoid will remain in its initial position (home position).

Output

Read More
All articles loaded
No more articles to load
Table of Contents