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 activates the RFID sensor to read any nearby RFID tags for the specified time. Once identified, the value of the reading is stored in the local system which can be used from the other blocks. The block also reports whether the operation is completed or not. If any RFID tag is scanned the block returns 1, else it returns 0.
The block reports the selected field data from the last read request from ThingSpeak.
The block resets the timer running for the oscillator to 0.
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 Gripper Robot’s gripper servo motor angle for the open or the close position to the specified value.
This block defines the angles at which the gripper of the robotic arm will open and close. The block ensures that the robotic arm will open and close the gripper at the specified angles.
The block returns the value of “hours”, “minutes”, “seconds”, “date”, “month”, “year” or “weekday” from evive’s RTC. 
This block opens and closes the gripper of the robotic arm by setting the gripper servo motor the opening angle and the closing angle set by the user using set gripper open angle to () & close angle to () block.
The block checks to see if its sprite is touching the edge of the screen with the move steps block — and if it is, the sprite will point in a direction that mirrors the direction from which it is coming. It uses a line perpendicular to the edge to determine the reflection angle.
This block resets all 7 graphic effects.
The block will report a specified value of the specified sprite or the Stage.
The block reports how many characters the given string contains.
The block checks if any items in the specified list are equal to the given text—if at least one of them is, the block returns true; if none of them are, it returns false. The item must contain the exact text; for example, “abc” would not work if the item contained “abcde”. This block is case-sensitive.
This block is used to check if the input image belongs to one of the classes previously defined. The class to be checked with can be set using the drop down menu.
The blocks add a force to the sprite with the defined value in the specified direction.
The block reports the data stored from the last RFID scan.
The block makes the specified type of HTTP request (GET, POST, or DELETE) on the specified URL. The request can have a body or not.
The block reports the time passed from the reset for the oscillator.
The block executes the oscillator for the complete cycle for the specified cycle times. The cycle time is the maximum time period assigned for the oscillator for the individual servo motors.
This block sets the angle of the robot’s gripper servo motor to a value you specify.
This block is used to open and close the gripper on a robotic arm by setting the gripper servo motor to specific opening and closing angles set by the user.
The block gives the value of the voltage sensed on the sensing ports of evive. There are 2 ports red (voltage range -30 to 30V) and blue (voltage range -5 to 5V). 
This block reports the value of the angle of the selected servo of the robotic arm.
The block changes the Rotation Style of the sprite in-project. Regardless of the style, the variable direction will still change.
If the block’s sprite is hidden, it will show the sprite. If the sprite is already showing, nothing will change.
It reports either the current local year, month, date, day of the week, hour, minutes, or seconds, depending on the argument. The block gets the data based on the user’s computer’s clock and set in 24-hour clock.
The block reports the remainder of the division when the first value is divided by the second. For example, when 10 is put in the first input and 3 in the second, the block will report 1; 10 divided by 3 gives a remainder of 1.
The block shows the specified list’s Stage monitor.
This block is used to get the class of the input face detected from the analysis. 
The block adds a spin force to the sprite with the specified value.
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