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
Mars Rover - Blocks, Python Functions, Projects | PictoBlox Extension
[PictoBloxExtension]

Mars Rover

Mars rover extension graphics
Extension Description
Control the Mars Rover Robot with Quarky.

Introduction

Mars is a fascinating planet. It’s icy cold and covered in reddish dust and dirt. Like Earth, it has volcanoes, gullies, and flat plains. Scientists can also see channels that look like they were carved by rivers and streams a long, long time ago. Over the years, NASA has sent five robotic vehicles, called rovers, to Mars. The names of the five rovers are Sojourner, Spirit and Opportunity, Curiosity, and Perseverance.

STEMpedia has created a miniature version of the Mars Rover to educate students about the different aspects of the Mars Rover in a more practical way.

The Mars Rover is programmable with PictoBlox in both modes – Block Coding and Python Coding.

Motor and Servo Motor

In our Mars rover, there are a total of 6 motors and 5 servo motors. 

The motors provide rotation to the wheels which helps the rover to attain motion in both forward and backward directions.  All the left side motors (3 motors) are connected to the left motor port of Quarky and all the right side motors (3 motors) are connected to the right motor port of Quarky using a 3 port wire. This means that to control the Mars rover we have to control only 2 motors – Left and Right. Also, there are 2 parameters to control – Direction (Forward or Backward) and Speed. With this control, the Mars rover can do all the desired motions.

The servo motors help in providing rotation to the complete wheel assembly so that the rover can change its wheel alignments and so its path. These play a major role in turning cases of the mars rover. The front two and the back two-wheel assemblies are connected with one servo motor each. Some important turns:

  1. Turning left on the same point:
  2. Turning right on the same point:
  3. Turning left on a circle:
  4. Turning right on a circle:
Note:  The middle wheel assemblies on either side are not connected to servo motors.

The fifth servo motor is connected to the head portion of the Mars rover so that the rover can rotate its head to detect obstacles. 

Connecting Mars Rover 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.
    Power Quarky
  2. Next, open PictoBlox on your desktop.
  3. After that, select Block or Python Coding 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

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.

Mars Rover Extension in Block Coding

Click on the Add Extension button and add the Mars Rover extension.

Once loaded, you will find the fresh blocks of Mars Rover in the block palette.

 

Mars Rover Extension in Python Coding

Click on the Add Modules/Libraries button and add the Mars Rover extension.

To access the library functions, you have to add the object declaration.

quarky = Quarky()
rover = MarsRover(4, 1, 7, 2, 6)
Read More

PictoBlox Blocks

The block turns OFF the specified RGB LED of Quarky.
The function stops the specified motor of the Quarky.
The block initializes the ultrasonic sensor with specified echo and trig pins.
The block checks whether the selected class has been detected or not. If the class is detected, then the block returns true; else, false.
Scripts that wear this block will activate once the selected class is predicted either on the recognition window, stage or camera.
Scripts that wear this block will activate once the selected class is predicted either on the recognition window, stage or camera.
The block reports the mass of the sprite.
The block sets the threshold for the sensor connected to the selected pin. Threshold helps users decide whether the sensor is active or not. If the sensor value is greater than the threshold value, the sensor is active, or else it is inactive.
The block reports if the Wi-Fi is connected to the Quarky or ESP32 or not. This block is only available in Upload Mode.
The block sets the oscillator parameters for the selected servo motor.
The block resets the timer to 0.
The block sets the servo motors of the humanoid legs and hands to the specified angles at the specified speed.
The block sets the selected servo motor angle to the specified angle in the specified time. This creates a smooth motion for the servo motor from the current angle to the specified angle.
The block sets the pick or the place action angles to the specified value.
The block makes a request to ChatGPT to get all the nouns, pronouns, verbs, adverbs, adjectives, propositions, conjunction, and interjection from the text specified in it. The response of ChatGPT is then stored in PictoBlox and can be accessed using the get AI response block.
This block takes in a given value and converts it to either an integer or a float depending on the input.
The block writes the text and numbers on the 4×7 segment display.
This block is used to control an end-effector of the robotic arm to move in an arc.
This block sets motor speeds for Quarky’s line following, defining forward and turning speeds for tracking a black line on a white path.
Jumps the sprite up, a specified number of grid squares and then down again.
Changes the costume of the sprite as specified from the options.
Runs the blocks inside if a specified button is pressed of the quarky.
Runs the left motor of the wizbot in a specified direction.
Lights up the LED of the wizbot with specified color.
The block is used to draw an outline of the circle or a filled circle of a specified radius and center position on evive TFT display. It takes the center and the radius of the circle from the user and draws an outline of a circle.
The block sets the digital state of the specified digital pin to either “High” or “Low”. If the output is High, the pin will be at 5V and if the output is Low the pin will be at 0V.
Dabble inputs module have two tactile switches. This block reports the state of the tactile switch (pressed or not) in real-time. If the switch is pressed, then it returns true else false.
This block is to assign custom hand actions to our Humanoid Robot.
The block moves its sprite steadily to the specified X and Y position in the specified amount of seconds – this is like pointing the sprite in a direction and repeatedly using Move () Steps, but with more precision. A disadvantage of the glide block, however, is that it pauses the script while the sprite is moving, preventing the script from doing other things while the sprite is gliding.
The block changes its sprite’s size by the specified amount. The default sprite size is 100; size values below that percentage are for shrunken sprites, and size values above it are for overlarge sprites.
All articles loaded
No more articles to load

Block Coding Examples

There are no block coding examples for the extension to show.

Python Functions

There are no python functions for the extension to show.

Python Coding Examples

There are no python examples for the extension to show.
Table of Contents