Table of Contents

display () with ()

Description

The block displays the specified character on the Quarky RGB LED.

The block has the following inputs:

  1. Character to be displayed on the LEDs.
  2. Color of the RGB LED when displaying.

Example

The example demonstrates how to implement a while loop running from 1 to 9 and show it on the Quarky display.

Script

Output

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

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