Deprecated: Required parameter $query follows optional parameter $post in /var/www/html/wp-content/plugins/elementor-extras/modules/breadcrumbs/widgets/breadcrumbs.php on line 1215
Programming the Humanoid with Block Coding in PictoBlox
[Humanoid]

Programming the Humanoid with Block Coding in PictoBlox

Description
Learn how to install, calibrate, and program Quarky’s humanoid robot kit with PictoBlox Block Coding. Create custom movements with special servo motors and servo oscillators and program the robot to perform a variety of motions and actions with ease.

Introduction

Quarky’s humanoid robot kit is a perfect way for students to learn about robot mechanisms, their control, and AI-based applications. With 6 DOF and stability features, it can be programmed to perform complex tasks with precision.

The robot is programmable with PictoBlox. PictoBlox is coding education software using graphical block-based coding and Python programming.

With PictoBlox, you can program the Humanoid to walk, dance, and make other cool moves! You can also create your own actions with special servo motors and servo oscillators.

If you haven’t installed PictoBlox, please follow the instructions:

Windows Installer (.exe)

STEP 1: Download the Pictoblox Installer (.exe) for Windows 7 and above (Release Notes).

STEP 2: Run the .exe file.

Some of the device gives the warning popup. You don’t have to worry, this software is harmless. Click on More info and then click on Run anyway.

STEP 3: Rest of the installation is straight forward, you can follow the popup and check on the option appropriate for your need.

 

Your software is now installed!

macOS Installer

STEP 1: Download the Pictoblox Installer (.dmg).

STEP 2: Run the .dmg file.

Mobile App Installer

STEP 1: Open Google Play Store on your Smartphone and and search for PictoBlox or visit the link here to head over to the Google Play Store. You can even scan the QR Code below from your Smartphone to head to the PictoBlox App.

STEP 2: Install the PictoBlox App.

Connecting Quarky with PictoBlox

Let’s begin by first connecting Quarky to PictoBlox. Select your preferred type of device i.e. either the desktop/laptop or your smartphone and follow the instructions.

Desktop

Follow the steps below for connecting Quarky to PictoBlox:

  1. First, connect Quarky to your laptop using a USB cable.
  2. Next, open PictoBlox on your desktop.
  3. After that, select Block as your coding environment.
  4. Then, click the Board button in the toolbar and select board as Quarky.
  5. Next, select the appropriate Serial port if the Quarky is connected via USB or the Bluetooth Port if you want to connect Quarky via Bluetooth and press Connect.
    COM Port
  6. Click on the Upload Firmware button. This will upload the latest firmware in Quarky.
    Note: If your device already has the latest firmware, then PictoBlox will show the message – Firmware is already updated. For learning more you can refer to this tutorial: https://ai.thestempedia.com/docs/quarky/quarky-toubleshooting/updating-quarky-firmaware-with-pictoblox/
  7. Once the firmware is uploaded, Quarky starts the Getting Started program. This runs only for the first time. Run through it.

And voila! Quarky is now connected to PictoBlox.

Mobile

Follow the steps below for connecting Quarky to PictoBlox:

  1. First, power ON Quarky.
  2. Open PictoBlox on your smartphone. Go to My Space and make a new project by clicking the ‘+(plus)’ button in the bottom-right corner.
    PictoBlox in Mobile Phone
  3. Then, tap the Board button in the top-right corner of the toolbar.
    PictoBlox BoardSelect board as Quarky.
  4. Next, tap the Connect button:
    PictoBlox ConnectSelect your device from the list.

And voila! Quarky is now connected to PictoBlox.

Quadruped Extension

The Quadruped extension in PictoBlox allows you to control the robot. It has blocks for specific applications. To add the Quadruped extension follow the instructions:

  1. Click on the Add Extension button and add the Quarky Quadruped extension.
  2. You can find the Quarky Quadruped blocks available in the project.

PictoBlox Blocks for Humanoid

The following blocks are available for the Humanoid:


Warning: Undefined array key "pp_wrapper_link" in /var/www/html/wp-content/plugins/powerpack-elements/extensions/wrapper-link.php on line 194

Warning: Undefined array key "pp_wrapper_link_enable" in /var/www/html/wp-content/plugins/powerpack-elements/extensions/wrapper-link.php on line 196

Warning: Undefined array key "pp_custom_cursor_icon" in /var/www/html/wp-content/plugins/powerpack-elements/extensions/custom-cursor.php on line 350

Warning: Undefined array key "pp_custom_cursor_text" in /var/www/html/wp-content/plugins/powerpack-elements/extensions/custom-cursor.php on line 351

Warning: Undefined array key "pp_custom_cursor_target" in /var/www/html/wp-content/plugins/powerpack-elements/extensions/custom-cursor.php on line 352

Warning: Undefined array key "pp_custom_cursor_css_selector" in /var/www/html/wp-content/plugins/powerpack-elements/extensions/custom-cursor.php on line 353

Warning: Undefined array key "pp_custom_cursor_enable" in /var/www/html/wp-content/plugins/powerpack-elements/extensions/custom-cursor.php on line 355
Controls the camera functionality, allowing users to turn the camera on or off and switch to other camera.
Starts the script whenever you press a specified button of the wizbot.
Calibrates wizbot sensors, ensuring accurate readings for line following
Switches the state of the wizbot to Grid mode.
The block takes the motor port, the direction of rotation (forward or reverse) and speed of rotation (between 0 to 100 %) as input from the user and rotates the motor accordingly.
evive has two tactile switches; this block checks if either of them is pressed. The switch whose state you want to check can be chosen from the drop-down menu on this block. It returns “true” if the switch is pressed and “false” if the switch is not pressed.
The block compares the latest string message in the terminal with the data input by the user in the block. If the data matches, it returns the true, else it returns false. 
The block reports either the temperature or humidity (selected from the dropdown menu) from DHT sensor connected to the digital pin selected from the drop-down menu.
The block is used to draw characters and symbols on evive TFT Display. The matrix size for the block is 20 horizontally and 16 vertically. 
This block defines the PWM pins to which each of the servos is connected.
This block defines the PWM pins to which all the four servos of legs(2 servos of legs + 2 servos of feet) are connected.
The blocks turn their sprite the specified amount of degrees clockwise. This changes the direction the sprite is facing.
The block gives its sprite a speech bubble with the specified text — the speech bubble stays until another speech or thought block is activated, or the stop sign is pressed.
The block will play the specified sound, with no pause to its script.
Blocks held inside this block will loop a given amount of times, before allowing the script to continue. If a decimal is put in, the number is rounded up.
Scripts placed underneath this block will activate when the specified key is pressed.
The block checks whether its sprite is touching a specified color. If it is, the block returns “true”.
The block checks if the first value is equal to the other value. If the values are equal, the block returns true; if not, false. This block is not case-sensitive.
The block will change the specified variable by a given amount.
The block enables or disables the automatic display of the box on the human pose or hand detection on the stage. This is useful when you want to see if the detection is happening or not.
The recognize () in image after () seconds block starts the camera and takes an image after the specified time and analyzes it. It then saves the image features in PictoBlox.
The function enables or disables the automatic display of the box on face detection on the stage.
This block is used to analyze the image received as input from the camera, for the handwritten and printed text.
When the block is executed, the recognition window will open and you will get a specified time during which PictoBlox will record whatever you say. Once recorded, the speech will be converted to the text of the language you spoke in and saved locally.
The block opens the recognition window and shows the machine learning analysis on the camera feed. Very good for visualization of the model in PictoBlox.
The block trains the NLP model with the data added with add () as () block.
The block enables or disables the automatic display of the box on object detection on the stage. This is useful when you want to see if the object detection happens during the analysis or not.
The block causes the text in the Text to Speech extension to be spoken using the pronunciation of the given language but does not translate the text.
The block returns the PictoBlox language of the current user. This block can be used with the translate () to () block, to translate to or from the end user’s set language.
All articles loaded
No more articles to load

Activity 1: Calibrating Humanoid Robot

In this activity, we are going to calibrate the humanoid robot. Due to some mechanical assembly errors, there may be some misalignment of the servos which can be handled with calibrate left hip () right hip () left foot () right foot () block and calibrate left hand () right hand () block.

Follow the steps:

  1. Open a new project in PictoBlox.
  2. Connect Quarky to PictoBlox.
  3. Click on the Add Extension button and add the Quarky Humanoid extension.
  4. Make the following code:

Run the code with Green Flag. Now you have to make sure that the robot has the following orientation:

If you find any twist of angle in the robot, edit the value of the servo motor in the calibrate left hip () right hip () left foot () right foot () block and calibrate left hand () right hand () block. If this step is not done properly, your robot may move in an incorrect manner.

Note: This has to be done only once as the offset values are stored in the memory of the robot.

Activity 2: Control Humanoid Predefined Motions

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

Follow the steps:

  1. Open a new project in PictoBlox.
  2. Connect Quarky to PictoBlox.
  3. Click on the Add Extension button and add the Quarky Humanoid extension.
  4. There are four predefined motions for Quarky in PictoBlox which can be accessed through do () motion () times at () speed Using the do () motion () times at () speed block, we can control the number of times the motion has to be executed. Motions: Forward, Backward, Left, and Right.
  5. Make the following code:
  6. Click on the green flag to run the motion sequence.
  7. Try running the robot at different speeds and try other actions.
Note:  If you feel that your robot is not running well, make sure to calibrate it.

Conclusion

In conclusion, Quarky‘s humanoid robot kit is an excellent resource to learn about robot mechanisms, their control, and AIbased applications. With PictoBlox, users can program the robot to perform a variety of motions and actions with ease, as well as create their own custom movements with special servo motors and servo oscillators. By following the steps outlined in this lesson, users can easily install PictoBlox and connect Quarky to the software, as well as calibrate the robot and program it to move in different directions.

Table of Contents