Table of Contents

display matrix as ()

Description

The block is used to create custom patterns on the RGB LED display of Quarky.

Beating-Heart (4)

 

The pattern can be customized with the Quarky Display Painter window.

Example

The project shows how to create custom patterns on Quarky RGB LED in Upload Mode.

Beating-Heart (4)

Script

Python Code Generated

# This python code is generated by PictoBlox

from quarky import *
# This python code is generated by PictoBlox

# imported modules
import time



while True:
	quarky.drawpattern("jjbjbjjjbbbbbjjbbbbbjjjbbbjjjjjbjjj")
	time.sleep(1)
	quarky.drawpattern("jjjjjjjjjbjbjjjjbbbjjjjjbjjjjjjjjjj")
	time.sleep(1)
	
	
Read More
Beating-Heart
The project shows how to create custom patterns on Quarky RGB LED in Upload Mode.

Beating-Heart (4)

Script

Read More
The example displays how we can display a custom pattern on the matrix by making a script to display a Traffic Light.

Script

Output

Read More
The example demonstrates using the Quarky touch display to make touch piano.

Script

 

Output

Touch-Numbers

Read More
Learn how to create a remote controlled robot navigation system using Quarky and PictoBlox block coding. In this project, you will learn how to control your robot’s movement in all four directions using arrow keys, while also displaying direction indicators on the RGB LED display for real-time visual feedback.

Introduction

Have you ever wanted to control a robot using your computer keyboard — just like the robots used in automation labs, smart factories, and robotics competitions? In this fun and beginner-friendly robotics project, we will program the Quarky robot to move in different directions using the arrow keys in PictoBlox’s Block Coding mode. No complicated coding knowledge is required, just simple drag-and-drop blocks to bring your robot to life!

Using Quarky and PictoBlox, we will create a block-coded script that allows the robot to move forward, backward, left, and right while also displaying direction symbols on the RGB LED matrix Display  for interactive visual feedback. The robot will even stop automatically when no key is pressed, making the control system smooth and user-friendly. This project is a great introduction to robotics control systems, human-machine interaction, and real-time input handling using block coding!

Prerequisites

Step 1

  • Quarky 
  • Laptop
  • PictoBlox installed on a Computer/Laptop

 

Connecting your Quarky to Pictoblox Blocks

Step 2

  1. Click on the Board tab on the top navigation bar and select Quarky.
  2. Now, click on connect and choose Bluetooth 
  3. Your Quarky has a unique code mentioned on it. Select your Quarky from the list and click on Connect.

 

4. Quarky plays a confirmation sound on connecting. Voila! Your Quarky is now connected to PictoBlox! 

Block-by-Block Guide

  1. When the green flag is clicked, the program starts running.
  2. The sprite first moves to the centre position (x:0, y:0), and its size is increased to 200% for better visibility on the stage.

Set Robot Orientation 

  1. Use the ‘set robot orientation as horizontal to’ ensure correct robot movement direction.

Move Forward (Up Arrow Key) 

  1. Add a Forever Loop to continuously check keyboard inputs

The first conditional checks whether the up arrow key on the keyboard is pressed. If true, Quarky moves forward at full speed while displaying a forward direction symbol on the LED matrix.

  1. Add an ‘if-else’ block from the Control palette.
  2. Add thekey up arrow pressed’ block from the Sensing palette inside the If block.
  3. Add the ‘go forward at 100% speed’ block from the Quarky Extension to move the robot forward.
  4. Add the ‘display matrix as’ the block to show a forward arrow symbol on the LED matrix.

  1. Add the ‘switch costume to (arrow1-d)’ block to visually indicate forward movement on the stage.

Move Backward (Down Arrow Key) 

The second conditional checks whether the down arrow key is pressed. If true, Quarky moves backward at full speed and displays a backward direction symbol.

  1. Add another ‘if-else’ block inside the previous Else section.
  2. Add the ‘key down, arrow pressed?’ block and change the dropdown to a down arrow.
  3. Add the ‘go backward at 100% speed’ block to reverse the robot’s movement.
  4. Add the ‘display matrix as’ a block to show a backward arrow symbol on the LED matrix.

Add the ‘switch costume to (arrow1-c)’ block to indicate backward movement visually.

Turn Left (Left Arrow Key) 

The third conditional checks whether the Left Arrow key is pressed. If true, Quarky moves left at full speed and displays a left direction symbol.

  1. Add another ‘if-else’ block inside the previous Else section.
  2. Add the ‘key left arrow pressed?’ block and change the dropdown to Left Arrow.
  3. Add the ‘go left at 100% speed’ block to make Quarky turn left.
  4. Add the ‘display matrix as’ block to show a left arrow symbol on the LED matrix.
  5. Add the ‘switch costume to (arrow1-b)’ block to visually indicate left movement.

Turn Right (Right Arrow Key)

The fourth conditional checks whether the Right Arrow key is pressed. If true, Quarky moves right at full speed and displays a right direction symbol.

  1. Add another ‘if-else’ block inside the previous Else section.
  2. Add the ‘key right arrow pressed?’ block and change the dropdown to Right Arrow.
  3. Add the ‘go right at 100% speed’ block to make Quarky turn right.
  4. Add the ‘display matrix as’ block to show a right arrow symbol on the LED matrix.
  5. Add the ‘switch costume to (arrow1-a)’ block to visually indicate right movement.

Stop Robot (No Key Pressed) 

The final Else condition checks whether none of the arrow keys are pressed. If true, Quarky stops moving, clears the LED matrix display, and switches back to its default costume. This prevents unnecessary movement and keeps the robot safe.

  1. Add the ‘stop robot’ block from the Quarky Extension inside the final Else section.
  2. Add the ‘clear LED matrix screen’ block to remove all direction symbols from the display.
  3. Add the ‘switch costume to Quarky’ block to restore the default robot appearance.
  4. This ensures the robot remains stationary when no keyboard input is detected.

Add a Small Delay

A small delay is added inside the ‘Forever loop’ to make the robot movement smoother and more stable.

  1. Add the ‘wait 0.2 seconds’ block from the Control palette at the end of the loop.
  2. This prevents the program from checking keyboard inputs too rapidly.

How to Run the Program 

  1. Click the ‘Green Flag’ button in PictoBlox to start the program.
  2. Press the Arrow Keys on your keyboard to move Quarky in different directions.
  3. Observe the robot movement, costume changes, and LED matrix direction symbols in real time.

Output 

Conclusion

Congratulations! You have successfully programmed the Remote Control Quarky robot to respond to  arrow key inputs using PictoBlox Block Coding. In this project, you:

  • Initialized Quarky and configured the robot orientation for accurate movement
  • Built a real-time keyboard control system using the Forever loop
  • Programmed Quarky to move forward, backward, left, and right using arrow keys
  • Added visual feedback using different costumes and RGB LED matrix Display direction symbols
  • Implemented an automatic stop condition when no key is pressed for safe navigation

These skills — keyboard input handling, conditional logic, robot navigation, RGB LED matrix display control, and real-time movement programming — are fundamental concepts used in robotics, automation systems, and AI-powered machines. You are not just controlling a robot; you are learning how intelligent machines interact with humans in real time!

Read More
Learn to move your Quarky Mecanum Wheel Robot in a square and make an axe figure with PictoBlox. Use the arrow keys to activate the custom movements and watch your robot move in the desired direction!

In this activity, we will create a custom activity where you will be able to move the Mecanum robot in a square effortlessly along with making an Axe type figure.

The Quarky Mecanum Wheel Robot is a type of robot that uses a special type of wheel to move. The wheel is made of four rollers mounted at 45- degree angles to the wheel’s hub. Each roller has its own motor and can spin in either direction. This allows the wheel to move in any direction, making it an ideal choice for navigating around obstacles.

Coding Steps

Follow the steps:

  1. Open a new project in PictoBlox and select Block Coding Environment.
  2. Connect Quarky to PictoBlox.
  3. Click on the Add Extension button and add the Quarky Mecanum extension.
  4. Now we will first initialize the Mecanum robots and the servos before starting the main code.
  5. Here there are two parts specifically : To make a Square and To make an Axe

To make a Square (Logic):

The main steps would include to display the lights in arrow forms before implementing the specific move. The moves would be implemented in the following order:

Forward -> Lateral Right -> Backward -> Lateral Left.

We will display the arrows with the help of Quarky LED’s and implement the code.

Example of arrow:

Code for Square Motion:

To make an Axe (Logic):

The main steps would include to display the lights in arrow forms before implementing the specific move. The moves would be implemented in the following order:

Forward ( 2 steps ) -> Lateral Left ( 1 step ) -> Backward Right ( 1 step ) -> Backward ( 1 step )

We will display the arrows with the help of Quarky LED’s and implement the code.

Code for Axe Motion

Main Code

Now we will keep a specific condition on when to activate the Square Motion and when to activate the Axe Motion.

We will use the if-else conditions where on pressing the “up” arrow key, we will initiate the Square Motion and on pressing the “down” arrow key, we will initiate the Axe Motion with the help of Mecanum Robot.

Final Output

Square Motion:

Axe Motion:

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

Activity Description

In this activity, students will program Quarky to detect a face’s position using the camera and respond with movements. Based on which direction the face is (left, right, or center), Quarky will display a pattern and move accordingly. This teaches camera-based input, angle calculations, and conditional movements.

Let’s Learn

  1. Open the PictoBlox application from the Start Menu.
  2. Select the inviting realm of Blocks as your coding environment.
  3. Connect “Quarky” to your computer using a USB cable. Then, click the Board button in the toolbar and Select Board as Quarky.
  4. 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.
  5. Click on the Add Extension button and add the Quarky Quadruped extension.
  6. Add when flag clicked block from the Event Palette. This block helps you to start the script.
  7. To set up the quadruped, you can drag and drop pins for each leg and hip into the initialisation block using set pins FR Hip () FL Hip () FR Leg () FL Leg() BR Hip () BL Hip () BR Leg () BL Leg () blocks. This block sets which pins on the Quarky controller board control each servo motor for the front right (FR), front left (FL), back right (BR), and back left (BL) hips and legs. Drag this block and set each PIN as shown.  FR Hip: 4, FL Hip: 1, FR Leg: 8, FL Leg: 5, BR Hip: 3, BL Hip: 2, BR Leg: 7, BL Leg: 6.
  8. Turn on the camera video on the stage with 0% transparency so it remains visible.
  9. Begin a forever loop to keep checking the face’s position continuously.
  10. Use the analyse image from camera block to start facial recognition.
  11. Declare the Variable ‘Angle’ Place get () of the face () at the first place of addition () + (), and 3 at the second place. From the dropdown, select X position.
  12. Set the variable Angle by calculating 90 + (x position of face ÷ 3) to decide how far the face is from the center.
  13. Use if-else blocks to respond based on the face’s horizontal position: If Angle > 90: Face is on the right side, show a face on the LED matrix and move left using “lateral left” motion.
  14. Else if Angle < 90: Face is on the left side, show a face and move right using “lateral right” motion.
  15. Else (Angle = 90): Face is centered, Show a smiley face and move to the home (neutral) position.
Note: Check by changing the angle value and also try to change the icons in the display matrix as L for left and R for right sid directions.

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
Explore the power of machine learning in recognizing hand gestures and controlling the movements of a Quadruped robot.

Introduction

This project demonstrates how to use Machine Learning Environment to make a machinelearning model that identifies the hand gestures and makes the Quadruped move accordingly. learning model that identifies the hand gestures and makes the qudruped move accordingly.

We are going to use the Hand Classifier of the Machine Learning Environment. The model works by analyzing your hand position with the help of 21 data points.

Hand Gesture Classifier Workflow

Follow the steps below:

  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 “Hand Gesture Classifier” extension. Click the “Create Project” button to open the Hand Pose 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.

Class in Hand Gesture Classifier

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

  1. Class Name: It’s the name to which the class will be referred as.
  2. Hand Pose Data: This data can either be taken from the webcam or by uploading from local storage.

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 Webcam or by Uploading the files from the local folder.
    1. Webcam:
Note: You must add at least 20 samples to each of your classes for your model to train. More samples will lead to better results.

We are going to use the Hand Classifier of the Machine Learning Environment.

 

Training the Model

After data is added, it’s fit to be used in model training. In order 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 the accuracy is 0 to 1.

Testing the Model

 

Hand Pose Classifier

The model will return the probability of the input belonging to the classes.You will have the following output coming from the model.

Logic

The Quadruped will move according to the following logic:

  1. When the forward gesture is detected – Quadruped will move forward.
  2. When the backward gesture is detected – Quadruped will move backward.
  3. When the left gesture is detected – Quadruped will turn left.
  4. When the right gesture is detected – Quadruped will turn right.

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 how to code logic for video input detection .set the bounding box threshold, and detect signals to control Humanoid movements.

Introduction

A sign detector Humanoid 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. Initialise the video on stage and set the transparency as 0%
  2. Show the bounding box and set its threshold to 0.8.
  3. Get the input from the camera forever.
  4. If the signal is detected as ‘Go’ then it displays an ‘up arrow’, sounds go straight and the Humanoid will move 2 steps forward at high speed using do () motion () times at () speed block.
  5. If the signal is detected as ‘TurnRight’ then it displays a ‘right arrow’, sounds Turn right and Humanoid will take a right turn at high speed using do () motion () times at () speed block.
  6. If the signal is detected as ‘TurnLeft’ then it displays a ‘Left arrow’, sounds Turn Left and Humanoid will take a left turn at high speed using do () motion () times at () speed block.
  7. If it detects as stop the display will be cleared in the quirky and the humanoid will be at a home() posture.

Output

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
All articles loaded
No more articles to load