CodeSpace: Using AI
The structured curriculum content in CodeSpace is designed to teach students without AI assistance. We strongly believe that beginning students need to experience typing (not pasting) the code, and working through their mistakes individually. Similar to working math problems, we learn through our failures as much as through our successes.
- Should you use AI to help you learn to code?
- Moreover, with the emergence of powerful AI, should students still learn to code at all?
Great questions! See our blog AI and the Future of STEM Education for our take on this (and why we answer emphatically YES! to both).
Warning!

When you're goal is learning, be careful not to use AI to avoid "productive struggle". Students must first attempt to solve problems on their own before seeking AI assistance.
Imagine if you had a Robot Personal Trainer at the gym. It could be really helpful!
- Maybe it could help you with your form, or suggest a new exercise.
- ...and if you ask, maybe it could even do the workout for you!
- But if you're trying to get stronger, this is pointless.
If you want to get stronger at coding, it's up to YOU not to cross that line.
AI for Understanding Code
If, after struggling for several minutes, the solution is still elusive, maybe an LLM can help. Here’s a prompt for guidance in such situations:
I’m learning Python, and I wrote the following code.
I’m trying to
[insert your goal here, ex: "make the LEDs light up in sequence
every time a button is pressed"]
but I’m not sure if it works correctly or why it's not behaving as expected.
Please help me understand what this code is doing, point out any mistakes
or improvements, and explain how I could fix or complete it.
Here’s my code:
# Your Code Here!
AI for Remixes
Remixes are a place where you can use AI more liberally. Using concepts that you’ve learned to build imaginative projects is exciting, but sometimes it’s hard to know where to start. AI can be your creative partner - a sounding board for your ideas, and an expert assistant to help make them a reality. But remember, the goal is to learn and create, not just to get a quick answer!
The following are prompts designed for each Firia Labs product. First paste the prompt shown, along with the Python modules downloaded from the links below. Follow that up with your remix ideas and questions.
- Note: The Python modules listed below, to upload to your favorite LLM as context, are only the beginning. Be sure to upload any additional modules you use in your remixes, so the LLM can help you with those as well!
CodeAIR
Paste this prompt text into your LLM chat box, AND upload the files codeair.py, and flight.py (linked below)
I’d like your help writing Python code for the CodeAIR, an educational drone
from Firia Labs that runs CircuitPython.
I’ve attached two Python modules used to control the CodeAIR:
* codeair.py: provides access to the drone’s hardware (buttons, LEDs, camera, etc.)
* flight.py: provides an interface to the flight controller CPU, for
sensor access and flight control. It includes a global variable fly, which
is an instance of MotionCommander adapted from the Crazyflie Python library.
Most student programs begin with:
from codeair import *
from flight import *
Please read and use the attached modules to help me write or debug code that
will run directly on the CodeAIR. When responding, assume that students are
coding on a beginner level. Provide clear, commented code and explanations
suitable for educational use. If there's more than one way to solve a problem,
prefer the method that reinforces foundational Python concepts.
https://docs.firialabs.com/codeair/codeair.html (opens in a new tab) - scroll to bottom for file link https://docs.firialabs.com/codeair/flight.html (opens in a new tab) - scroll to bottom for file link
CodeX
Paste this prompt text into your LLM chat box, AND upload the file codex.py (linked below)
I’d like your help writing Python code for the CodeX, a handheld educational device
from Firia Labs that runs CircuitPython.
I’ve attached a Python module used to control the CodeX:
* codex.py: provides access to the device’s hardware (LCD, buttons, LEDs, sensors, etc.)
Most student programs begin with:
from codex import *
Please read and use the attached module to help me write or debug code that
will run directly on the CodeX. When responding, assume that students are
coding on a beginner level. Provide clear, commented code and explanations
suitable for educational use. If there's more than one way to solve a problem,
prefer the method that reinforces foundational Python concepts.
https://docs.firialabs.com/codex/codex.html (opens in a new tab) - scroll to bottom for file link
CodeBot (physical and virtual)
Paste this prompt text into your LLM chat box, AND upload the file botcore.py (linked below)
I’d like your help writing Python code for the CodeBot, an educational 2-wheeled
rover from Firia Labs that runs CircuitPython.
I’ve attached a Python module used to control the CodeBot:
* botcore.py: provides access to the device’s hardware (motors, buttons, LEDs, sensors, etc.)
Most student programs begin with:
from botcore import *
Please read and use the attached module to help me write or debug code that
will run directly on the CodeBot. When responding, assume that students are
coding on a beginner level. Provide clear, commented code and explanations
suitable for educational use. If there's more than one way to solve a problem,
prefer the method that reinforces foundational Python concepts.
https://docs.firialabs.com/codebot/botcore.html (opens in a new tab) - scroll to bottom for file link