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

Moves the wizbot in arc length in specified direction and step length from the options.
The block is used to draw an outline of the triangle or a filled triangle from three points on evive TFT display. It takes the color and the 3 points for the corner of the triangle to draws a triangle.
When the block is executed it plays the tone of specified frequency/note for a specific duration/beat. The note and the beat can be selected from the drop-down menu. Also, the user can input the specific frequency and duration (in milliseconds).
Dabble input module has 2 potentiometers whose value can be varied from 0 to 1023 by the user. This block reports the current value of the selected potentiometer.
The block sets the end-effector to the specified position on the selected axis and the other two positions remain the same.
This block sets the value of the selected servo by the value you enter. Whereas the angle of other servos remains the same.
The block changes the selected sprite’s X position to a specified value.
The block changes the specified effect on its sprite by the specified amount. There are seven different effects to choose from: colour, fisheye, whirl, pixelate, mosaic, brightness and ghost.
The block reports how loud the noise is that a microphone receives, on a scale of 0 to 100. To use this block, a microphone must be used, and so a message will appear on the screen, asking for permission to use the microphone. If you deny it, the block will report a loudness of 0 or -1.
The block picks a pseudorandom number ranging from the first given number to the second, including both endpoints. If both numbers have no decimals, it will report a whole number. For example, if a 1 and a 3 were inputted, the block could return a 1, 2 or 3. If one of the numbers has a decimal point, even .0, it reports a number with a decimal. For example, if 0.1 and 0.14 were given, the output will be 0.1, 0.11, 0.12, 0.13, or 0.14.
The block replaces the specified item; in other words, it changes the item’s content to the given text.
The function allows the user to add a particular face into the database from the camera or stage. The user can specify the name of the face with the argument as well. This addition of the face in the database is also stored inside the PictoBlox file while saving.
The block returns the specified parameter for the specified number card detected.
The function set the API keys for the Open Weather Map API calls.
The block returns the hex code of the Red, Green, and Blue values specified.
The block returns the state of the digital sensor connected to the specified pin of the Quarky.
The block does the step simulation for the Physics Engine. This block is required to run in a loop for the physics to work.
The block reports the moisture reading from the sensor. The value varies from 0 to 100%.
The block sends multiple data to the ThingSpeak channel with a delay of the specified time seconds. The data is mapped to the 8 fields of the ThingSpeak channel.
The block executes the oscillator according to stored parameters for the servo motor and the current angle specified in the block.
The block sets the oscillator parameters for the selected servo motor.
The block moves the servo motors of the pick and place robot to the place angle specified by the user.
The block sets the user API key of the ChatGPT in the project. 
The block makes the specified LED turn ON or OFF on the 8×8 Dot Matrix display.
This block is used to move the end-effector to the specified position of the selected axis, while the other two positions remain the same.
This block allows the user to control the end-effector of a robotic arm to move in a specified axis by a set value, with all other axes remaining constant.
This block is use for set the motor speed while doing the line following and Turning.
Moves the wizbot forward for a √2 step length on the grid pattern.
The block sets the time on evive’s Real Time Clock (RTC) to the time specified by the user in the input.
Dabble phone sensor module give the real-time reading of the following sensors to evive: Accelerometer, gyroscope, proximity sensor, magnetometer, light meter, sound meter, GPS, temperature sensor and barometer. This block reports the current value of the selected sensor.
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