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

Play’s a notes from wizbot as specified from the list
This block allows sprite to go to any random position on stage.
The block is used to draw an outline of the ellipse or a filled ellipse of a specified X length, Y length and center position on evive TFT display. It takes the color, center, X length and Y length of the ellipse from the user and draws an ellipse.
The block set PWM output on evive PWM pins. The user can select the output from a range of 0 to 255.  If the PWM output is 128, then half the time output will be High and for rest, the output will be Low.
Dabble input module have 2 slide switch type input, having states left, right and off. This block reports if the selected slide switch is in the selected state in real-time. If the slide switch is in that state, then it returns true else false.
The block moves the end-effector in an arc.
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 moves its sprite costume center’s X position by the specified amount.
The block sets its sprite’s size to the specified amount. The default sprite size is 100%; anything lower than that will decrease the size of the sprite on the stage, and anything above will increase the size of the sprite on the stage.
It deletes the clone it runs in. This block is the only way, besides for clicking the Green Flag or Stop Sign, to delete clones.
The block holds the mouse-pointer’s current Mouse Y.
The block divides the second value from the first and returns the result. If the first value is not evenly divisible by the second, the reported value will have decimals. To find the remainder instead, use the () Mod () block. Note, dividing by 0 in the online editor will return infinity, 0, or negative infinity. It depends on if the numerator is positive, 0, or negative; respectively.
This function returns the specified parameter of the hand landmark detected.
The get () position of landmark () of the face () block reports the x and y position of the selected landmark (number from 1 to 68) of the selected face.
The block returns whether the specified number card (0-9) is detected in the analysis or not.
The function returns the city name of the location.
The block changes the brightness level of the RGB LEDs of Quarky to the defined value.
The block returns the analog reading of the sensor connected to the specified analog pin of the Quarky. The value varies between 0 to 4095.
Scripts that wear this block will activate once the selected class is predicted either on the recognition window, stage or camera.
The block enables the physics engine for the selected objects with the defined precision level.
The block activates the script under this hat block when the moisture reading from the sensor is greater than the specified value. 
The block sends the data to the ThingSpeak channel with a delay of the specified time seconds. The data is added to field 1 of the channel.
The block executes the oscillator according to stored parameters for the servo motor and the current time.
The block moves the servo motors of the pick and place robot at the pick angle specified by the user.
The block makes a request to ChatGPT to get an easily understandable text of the text specified in it. The response of ChatGPT is then stored in PictoBlox and can be accessed using the get AI response block.
The block displays the custom pattern on the 8×8 Dot Matrix Display.
PID functions use sensor feedback to improve the robot’s movement accuracy and stability.
Stops all the movement and actions of the wizbot.
Play’s a sound from quarky as specified from the list.
Mirrors the orientation of the sprite.
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