Quarky has an inbuild motor driver to drive 2 motors on the back side.
With Innovator Kit and Ultimate Kit, you get the motors assembled. The Robot looks like this:
Robot Motion Logic
Before we go ahead, we first need to understand how to make Quarky move.
- If both the wheels of the robot rotate in the forward direction, then it will move forward. That makes sense, right?
- Similarly, if both wheels rotate in the backward direction, the robot will move backward.
- Making the robot turn left and right is the tricky part. To make Quarky turn left, its right wheel should rotate in the forward direction but its left wheel should rotate in the backward direction.
- On the other hand, to make Quarky turn right, its left wheel should rotate in the forward direction and the right wheel should rotate in the backward direction.
Block Coding
In PictoBlox, you have the following blocks available for the Quarky Robot:
Block Coding Examples
Python Coding
In PictoBlox, you have the following functions available for the Quarky Robot:
Stage Mode
Stage mode is one of the two modes you can write your programs in Pictoblox. In this mode, you can write scripts for the sprite and boards to interact with sprites in real time. If you disconnect the board with Pictoblox, you cannot interact with the board anymore. In this mode, you can make games and animations by interacting with Quarky.
You can toggle between the upload mode and stage mode using the button on the top right side of Pictoblox.
In Python Coding Environment, use the following object declaration to use Python functions in Stage Mode:
quarky = Quarky()
Upload Mode
Upload mode is one of the two modes you can write your programs in Pictoblox. This mode allows you to write scripts and upload them to the board so that you can use them even when it is not connected to your computer, for example, you need to upload a script for making moving robots.
In this case, Quarky will run offline according to the program and it can not interact with the stage.
In Python Coding Environment, use the following object declaration to use Python functions in Upload Mode:
from quarky import *
Python Coding Examples
Conclusion
In this lesson, we have learned about how to control the motion of Quarky Robot using PictoBlox – both in Stage Mode and Upload Mode. We have also learned about the various blocks and functions available for controlling the robot in Python Coding Environment. With the help of these blocks and functions, we can make Quarky move in the specified direction and also make it perform line following and other complex functions.