[Mecanum]

Programming the Mecanum Robot with Block Coding in PictoBlox

Description
Learn how to program your Quarky Mecanum Wheel Robot with PictoBlox. With the help of PictoBlox, you can control the robot to move, grip, and perform pick & place actions.

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 and tight spaces. The mecanum wheel robot can also turn on the spot, allowing it to make sharp turns without having to reverse direction.

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

With PictoBlox, you can program the Mecanum Robot to move, grip, and perform pick & place actions!

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.

Quarky Mecanum Extension

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

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

PictoBlox Blocks for Quarky Mecanum

The following blocks are available for the Quarky Mecanum:

The block moves the Quarky robot in the specified direction. The direction can be “FORWARD”, “BACKWARD”, “LEFT”, and “RIGHT”.
The block is a hat block and starts the execution of the script added under it when the specified push button is pressed. 
The block plays the specified audio on the Quarky speaker. The block does not have any callbacks, so other blocks can be executed while this block is running.
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 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 sets the servo connections of the specified location to the specified pins.
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 sets the input for the number classification and regression model to the specified value. The dropdown of the inputs is dynamically populated according to the ML model trained. 
The block opens the recognition window and shows the machine learning analysis on the audio feed. Very good for visualization of the model in PictoBlox.
The block sets the boundaries for the stage. Available types: boxed with roof, boxed without roof, open with floor, and open without floor.
The block set the state of the relay connected to the selected pin to High or Low. A high state means that the pin will have 3.3V and for Low, the pin will be 0 V. This triggers the state of the relay.
The block initializes the Expansion Board of Quarky for use. Without initialization, the board will not respond to any other blocks.
The block connects the Quarky or ESP32 to the specified Wi-Fi and password. The block is only available in the Upload Mode when the code is uploaded to Quarky. 
The block sets the IFTTT event name and the webhook key for the project. 
The block initializes the quadruped robot and maps the 8 servos to the specified pins.
The block creates the CSV file with the specified name and links all the data storage to it. If the file already exists, then it rewrites it.
The block initializes the Quarky Mecanum Robot Drive Motors. This allows the code to have information on which port is connected to the Front Left, Front Right, Back Left, and Back Right Servo Motors.
The block sets the randomness and creativity level of the ChatGPT responses, varying from 0 to 1. This setting controls the creativity of the system, with higher values leading to more creative output. By default, the creativity value is set to 0.7.
The read state of digital pin () block is a boolean block available in Arduino Uno, Arduino Mega, and Arduino Nano boards. It reads the state of the digital pin on the hardware and returns either a True value (if the pin is set to “High”) or a False value (if the pin is set to “Low”).
The block does the pin assignments for a 16×2 display module. The specific pins that are assigned are for the Reset (RST), Enable (EN), Data 4 (D4), Data 5 (D5), Data 6 (D6), and Data 7 (D7) pins of the module. This initialization enables the code to use the 16×2 display.
This block initializes a Robotic Arm connected to a Quarky Expansion Board. The user can select the specific pin connected to the servo motors from a dropdown menu. Once initialized, the robotic arm will respond to code and be ready for further instructions.
Configure Quarky for advanced line following by connecting two IR sensors to analog pins or three IR sensors to digital pins for optimal alignment and control.
Starts the script when the green flag is clicked.
Moves the sprite a specified number of step forward.
Shows a specified message in a speech bubble above the selected sprite.
Pauses the script for a specified amount of time (in seconds).
This button allows to record a sound from mic.
After execution, the sprite will draw lines on the stage when sprite is moved.
After connection is established, moves the quarky a specified number of step forward.
Lights up the LED of the quarky with specified color.
All articles loaded
No more articles to load

Conclusion

In conclusion, the Quarky Mecanum Wheel Robot is a powerful and versatile robot that can be programmed using PictoBlox. With its Mecanum extension, it can be programmed to move in any direction, grip objects, and perform pick & place actions. With the help of PictoBlox, users can easily program the robot to perform their desired tasks.

Table of Contents