top of page

3 Projects for Students to Learn Coding... While Exploring Mars

By Chris Bell, COO, ARES Learning

For many years, the planet Mars has been explored remotely by spacecraft. Beginning in the late 20th century, probes sent from Earth have yielded a significant increase in our knowledge about the Martian system. Much of that information gathering has focused on understanding the geology of Mars and its habitability potential as mankind plans for surface exploration of Mars.

It’s no secret that computer science (CS) principles, coding, and space exploration go hand in hand. From the onboard computer systems to the satellites that orbit the earth to the Mars rovers, these technologies are underpinned by computer science. Without coding, we would have far less information available to aid our exploration of the solar system. Because of this, any space education program should include an introduction to the dominant coding languages utilized for space exploration and development.

NASA’s education division at Jet Propulsion Laboratory has created a series of coding exercises that are excellent resources for the budding space engineer. Through these exercises, students use coding to build and operate Mars rovers and the Mars helicopter. This is pretty exciting stuff that helps students bridge the theoretical concepts of CS and space to the practical application of CS.

We’ve broken the three projects down into some detail along with suggested age ranges for each project.

Code a Mars Helicopter Video Game

Ages: 10-18

Languages used: MIT Scratch block-based coding

This highly accessible starter project has students design a video game in MIT’s Scratch, a block-based visual programming language. The game lets players explore the Red Planet with a helicopter similar to the one going to Mars with NASA's Perseverance rover! This project is perfectly suitable for upper elementary to high school and includes all the resources needed and a Scratch project template that helps students think like a space designer. Notably, the game can be created on Chromebooks or Mac/PCs.

Explore the Helicopter Video Game project on the JPL Nasa education site and start the project from the Scratch template for the game.

Code a Mars Rover Driving Game

Ages: 12-18

Languages used: Python

The second project is great for developing student understanding of text-based coding. With this project, learners use the programming language Python to code a game that simulates how NASA explores Mars using rovers. The game challenges players to drive a Mars rover from one location to another while avoiding hazards.

This game is best developed on a Mac, PC, or Linux environment using Python’s Integrated Development & Learning Environment (IDLE). The code supplied also uses Pygame, a set of Python modules specifically designed for coding video games. The code library includes computer graphics and sound libraries for the Python programming language.

Explore the Code a Mars Rover Driving Game project on the JPL Nasa education

Code a Mars Landing

Ages: 12-18

Languages used: Python

The final project combines coding with physical hardware to simulate a Mars landing. Through this project, students learn to program several features of entry, descent, and landing (EDL), such as calculating the spacecraft's distance from the surface once it arrives at Mars.

Specific tasks the students complete include determining where to land, coding sensors to calculate distance, creating alarms, powering rovers with sunlight sensors, and communicating information back to mission control. There is a lot to learn through this project!

The project includes a list of required items that can be sourced individually or through compatible kits that use Raspberry Pi or other microprocessors.

Example kits:

Explore the Code a Mars Landing project on the JPL Nasa education

Explore more from Learning Space With NASA at home including many more DIY projects for the budding space entrepreneur.

53 views0 comments

Recent Posts

See All


bottom of page