Introduction: Star Wars Inspired Coding Challenge!

About: Educator, designer, maker of things

As a teacher of Technology, Engineering, and Design working to still provide interesting and meaningful lessons through Distance Learning due to COVID-19, I wanted to create a themed challenge inspired by Star Wars.

In honor of the fictional world of technology and innovation that exists within the Star Wars universe, I challenged my programming students to use the P5.js programming language software to help R2D2 fix the hyperdrive of the millennium falcon on the week of May 4th (may the 4th be with you!). I also created a CAD challenge instructable that can be seen here. All challenges and resources are collected on my teacher webpage here.

P5.js is an incredible visual language based on the open source language of processing, which is based on Java-script. Its a fast to learn, easy to use, and quick result language that is cross platform compatible with HTML, android, apple, etc. This makes it fun and easy to teach and my students love it. You can make anything from apps, games, animations, websites, or just about anything really. It also shares the same architecture as Arduino, which I also teach, so going between the two languages is manageable. Check out my P5.js tutorial videos on my digital classroom youtube channel here.

Step 1: The Code and IDE

For programming P5.js, I use openprocessing.org. Its a great web-based IDE that works on any device and has awesome tools for educators like classes and assignment submissions.

For this hyperdrive challenge, students must start with this base program, then create a "fork" of the program. A fork is kind of like a copy, it places a copy of the code in their own documents but retains all code, media, and settings attached in the original. It also allows me to monitor student progress as their "professor" on open processing.

There's still much we haven't covered yet, so I did a chunk of the programming for my students. I also wanted the point of this challenge to be applying what they know in a different, and "real-world" application that was engaging for our distance learning during COVID-19.

Throughout the code, R2D2 left comments telling the students whether the sections of code were correct, or had flaws. Students need to add a keypressed function to enable the space bar interacting with the code. Then they need to correct an if statement that has been programmed in correctly, or "damaged".

See the next step for a guiding video and the answer key.

Step 2: Tutorial and Answer Key

To assist my students that need a little more support, I created this guiding tutorial on helping R2D2 correct the code and enter light speed. I also created this answer key finished program that enters light speed when the space bar is pressed.

I hope you enjoyed this! Thanks for reading and May the force be with you!

Space Challenge

Participated in the
Space Challenge