AI Unlocks the Treasure Chest: A Classroom STEM Project

What if students could only open a treasure chest by teaching artificial intelligence to recognize a word?

In this project, I combined a HuskyLens AI camera, a Hummingbird Robotics Bit, and two micro:bits to make that idea come to life.

Here’s how it works:

  1. The HuskyLens is trained to recognize the word “GOLD.”
  2. When it sees the word, it signals the sender micro:bit connected to the Hummingbird Robotics Bit.
  3. The sender transmits a radio signal to the receiver micro:bit attached to a cardboard treasure chest.
  4. If the signal matches, the servo motor unlocks the chest, revealing the prize.

If the recognition isn’t correct? The chest stays locked.

This project shows students how AI, coding, and robotics connect in the real world. They explore:

  • How computer vision works.
  • How devices communicate and validate information.
  • How software and hardware come together to control the physical world.

It’s more than a pirate-themed build. It’s a lesson in critical thinking, system design, and the future of AI in everyday technology.

This project combines:

  • AI literacy – students train the camera themselves.
  • Coding – radio communication between micro:bits.
  • Robotics – servos bring the system to life.

The treasure chest project transforms abstract AI concepts into a tangible, story-driven learning experience. It sparks curiosity, creativity, and critical thinking, all while making AI fun and approachable.

With just cardboard, code, and creativity, students can see how AI connects the digital and physical worlds.

Taught #AI a new trick → it opens treasure. Built with a #HuskyLens AI camera, a #Hummingbird Robotics Bit, and #microbit

Back to School with Python Turtle: Drawing Creativity into Code

As the new school year begins, I wanted to create a project that combines creativity and coding in a way that’s fun, visual, and approachable for beginners. Enter: Python Turtle Graphics 🐢.

Turtle is a fantastic way to introduce students to programming. Instead of jumping straight into abstract concepts, learners can instantly see their code come to life as drawings on the screen.

For this Back-to-School project, I programmed Turtle to draw a colorful pencil, complete with:
✏️ A golden body
✏️ A pink eraser
✏️ A silver band
✏️ A sharp graphite point

Finally, the turtle writes “Back to School! 2025–2026” across the screen on a chalkboard-style background image.

Here’s what students learn while making this project:

  • Functions – Creating reusable blocks of code to draw shapes.
  • Coordinates – Moving the turtle to specific positions on the screen.
  • Colors and fills – Bringing graphics to life with design choices.
  • Creativity and logic – Turning lines of code into a meaningful image.

This project is more than just art. This is a lesson in computational thinking. Students break a problem into steps, design a solution, test it, and see instant results.

It’s the perfect activity to kick off the 2025–2026 school year, sparking curiosity and showing that coding is not only powerful but also fun and creative.

👉 Want to try it yourself? Here’s a snippet of the project:

import turtle

# Set up the screen
screen = turtle.Screen()
screen.bgpic("back-to-school.jpg") # upload your own

# Create the turtle
t = turtle.Turtle()
t.shape("turtle")
t.speed(2)

# Function to draw rectangle
def draw_rectangle(color, width, height):
    t.begin_fill()
    t.fillcolor(color)
    for _ in range(2):
        t.forward(width)
        t.left(90)
        t.forward(height)
        t.left(90)
    t.end_fill()

# (Drawing code continues…)

With just a few tweaks, students can customize their pencil colors, change the text message, or even add more decorations.

Challenge your students: Instead of drawing a pencil, can they create their own “back-to-school” symbol with Turtle? Maybe a chalkboard, a backpack, or even a stack of books?

Here’s to a year full of creativity, coding, and learning! Have questions? Contact me here!

🐢✏️ Back-to-School with Python Turtle! Check out this pencil and message coded using #Python graphics – perfect for teaching functions, loops and creativity in coding. Kick off the school year with code and art! #BackToSchool #EdTech #LearnToCode

Bringing STEM to Life with a Bubble Machine

Bubbles are more than just entertainment. Behind every floating sphere is a lesson in surface tension, air pressure, and the properties of liquids and gases. A bubble machine provides an easy, engaging way to bring these concepts into the classroom or makerspace while keeping learning hands-on and fun.

The Science Behind the Machine

A bubble machine demonstrates simple engineering principles in action:

  • Rotation and Dipping – A wheel or set of wands rotates through a bubble solution.
  • Airflow – A fan directs air through the soap film, forming bubbles.
  • Continuous Output – The cycle repeats, producing a steady stream of bubbles.

In this process, students can see how mechanical systems and basic physics combine to produce a real-world effect.

Learning Opportunities

Bubble machines naturally spark curiosity, and teachers can leverage that curiosity to explore key STEM topics:

  • Physics – Investigate surface tension, evaporation, and how air pressure shapes each bubble.
  • Chemistry – Experiment with different bubble solution recipes and test which mixtures create stronger or longer-lasting bubbles.
  • Engineering & Design – Challenge students to improve the machine’s performance by adjusting wand size, fan speed, or solution type.
  • Math – Measure bubble size, count output over time, or estimate how long a batch of solution lasts.

Why This Activity Works in Education

  • Hands-on Engagement – Students actively test, observe, and refine their ideas.
  • Collaboration – Building or running a bubble machine encourages teamwork.
  • Real-World Connection – Everyday play becomes a vehicle for understanding scientific principles.

Bringing It Into Your Classroom or Makerspace

Teachers don’t need elaborate equipment to get started. A simple store-bought bubble machine can introduce the concepts, while a DIY build can become a full engineering project. Pair the activity with guiding questions, such as:

  • What factors make bubbles last longer?
  • How does changing the airflow affect bubble size?
  • Why do bubbles eventually pop?

These questions shift the focus from entertainment to exploration, helping students connect what they see to what they learn.

Final Thoughts

A bubble machine is more than a novelty. It’s a portable STEM lab. With a mix of play and purpose, it turns ordinary bubbles into opportunities for inquiry, problem-solving, and discovery.

Check out this bubble blowing machine using the micro:bit and a Hummingbird kit. Servo dips the wand, motor blows the bubbles, and MakeCode brings it to life. Hands-on learning at its best! #microbit #hummingbirdrobotics #physicalcomputing

Latest Posts

🌻 Creating a Flower with Python

Python’s Turtle Graphics module is one of the most fun ways to bring coding to life. With just a few lines of code, you can make your turtle draw shapes, patterns, and even full pictures. In this tutorial, we’ll use Python Turtle inside the Trinket IDE to create a flower with petals, a stem, and leaves, all set against a sunflower background.

✨ What You’ll Need

  • A free Trinket.io account.
  • Basic knowledge of Python functions and loops.
  • The Turtle module (already built into Python).

🌼 Step 1: Setting the Scene

We’ll start by creating a new trinket and setting up our canvas, giving it a background image to make the drawing pop. In this case, we’ll use a sunflower background (you’ll need to download an image of your own – try searching on Pixabay.com):

import turtle

# Set up the screen
screen = turtle.Screen()
screen.bgpic("sunflower.jpg")

🌼 Step 2: Meet Our Artist

Next, we create the turtle pen that will do all the drawing:

# Create the turtle
pen = turtle.Turtle()
pen.shape("turtle")
pen.speed(20)

We set the turtle shape to "turtle" (just for fun!) and increase the speed for smoother drawing (you can decrease the speed by changing this value to a smaller number).

🌼 Step 3: Drawing a Petal

Flowers are made of petals, so we’ll write a function to draw a single petal. This function uses circles and angles to create a petal shape:

def draw_petal():
    pen.begin_fill()
    pen.circle(100, 60) # Arc
    pen.left(120)
    pen.end_fill()
    pen.circle(100, 60)
    pen.left(120)

🌼 Step 4: Building the Flower

To form the flower, we draw 36 petals, turning slightly after each one:

pen.color("darkorange")
pen.penup()
pen.goto(0, 60)
pen.pendown()

for _ in range(36):
    draw_petal()
    pen.left(10)

This loop creates a full circular arrangement of petals—like a sunflower or daisy!

🌼 Step 5: Adding the Flower Center

Every flower needs a center. We’ll draw a yellow circle in the middle:

pen.goto(0, 20)
pen.color("yellow")
pen.begin_fill()
pen.circle(40)
pen.end_fill()

🌿 Step 6: Drawing the Stem and Leaves

Finally, we add a green stem and two leaves using larger circles and arcs:

# Stem
pen.goto(0, 15)
pen.right(90)
pen.color("green")
pen.pensize(10)
pen.forward(200)

# Left leaf
pen.right(150)
pen.forward(80)
pen.right(45)
pen.begin_fill()
pen.circle(80, 90)
pen.left(90)
pen.circle(80, 90)
pen.end_fill()
pen.right(45)
pen.forward(80)

# Right leaf
pen.penup()
pen.left(120)
pen.pendown()
pen.forward(80)
pen.right(45)
pen.begin_fill()
pen.circle(80, 90)
pen.right(-90)
pen.circle(80, 90)
pen.end_fill()

🌻 The Final Touch

At the end, we hide the turtle so that only our artwork remains:

pen.hideturtle()

🎨 The Result

When you run the program in Trinket, you’ll see a flower with orange petals, a yellow center, a green stem, and two leaves, on top of your sunflower background.

This is a great project to learn about:

  • Loops (drawing multiple petals).
  • Functions (reusable code for each petal).
  • Positioning with penup() and pendown().
  • Colors and fills to make drawings vibrant.

🚀 Next Challenge

Try experimenting with:

  • Changing the number of petals.
  • Using different colors.
  • Adding more leaves or flowers.
  • Refactor or improve the code!

👉 With just Python and Turtle, you can create stunning visual art while learning the fundamentals of programming. Keep experimenting and watch your garden grow! 🌸

Try this tutorial to code a flower with Python! 🌻 A perfect project to capture the last days of summer. It’s a fun and easy way to blend coding with visual art. #Python #TurtleGraphics #CodingForBeginners #CreativeCoding

Latest Posts

Visualizing Recursion with a Python Turtle Spiral

Understanding Recursion with a Simple Spiral

Recursion is one of those programming concepts that can be a bit confusing at first. You’re told that a function calls itself, and your mind immediately jumps to the idea of an infinite loop. To truly understand it, you need to see it in action. That’s exactly why I built an animated recursive spiral using Python’s simple yet powerful Turtle graphics library.

What is a Recursive Function?

At its core, a recursive function is a function that solves a problem by calling itself. This might sound confusing, but every recursive function is built on two simple principles that prevent it from running forever:

  1. The Base Case: This is the stopping condition. It’s the point where the function knows it has reached the simplest version of the problem and can return a result without making another recursive call. Without a base case, your program would get stuck in an endless loop, eventually crashing.
  2. The Recursive Case: This is where the function calls itself again, but on a “smaller” or “simpler” version of the original problem. Think of it like a set of nested Russian dolls; you keep opening the dolls until you get to the smallest one that can’t be opened anymore (the base case).

The Animated Spiral

I chose a spiral because it’s a perfect visual metaphor for recursion. The recursive_spiral() function I created has one main parameter: length.

  • The Base Case: The function stops drawing and returns when the length of the line it’s supposed to draw becomes very small (less than 5). This is the small center of the spiral.
  • The Recursive Case: In each step, the function draws a line of a specific length, then turns 90 degrees and calls itself again, but with a slightly shorter length (e.g., length - 5).

By visualizing this process, you can literally see the function call itself to solve a simpler version of the problem (drawing a smaller spiral) with each turn. The turtle draws the initial long line, then the function calls itself to draw a slightly shorter one, and this continues until the base case is reached. The spiral’s journey from a large outer ring to its tiny, final center demonstrates the recursive process.

This project was a great exercise in connecting a core computer science concept to a visual medium. It transformed an abstract idea into something tangible and easy to follow.

Watch this animated spiral to visualize recursion. Each turn of the spiral is a new function call, showing the process in action. #Python #Recursion #Code #TurtleGraphics #Programming – Check out the demo here:

Selection Sort vs. Bubble Sort: Which One Wins?

When learning sorting algorithms, two of the most common examples are bubble sort and selection sort. I built a Python program in Trinket.io using Pygame to visualize selection sort, and I compare it with bubble sort side by side in my video. 💡 Which one do you think will finish first?

What is Selection Sort?

Selection sort works by repeatedly finding the smallest element in the unsorted portion of the list and swapping it with the element in the current position. Over time, the list becomes sorted from front to back.

This is different from bubble sort, which relies on swapping adjacent elements so that larger values “bubble up” toward the end of the list.

Why It’s Useful

  • Easy to understand
  • Great for learning sorting logic
  • Not efficient for large datasets (time complexity O(n²))

Get the Code

If you’re interested in using this project as your own learning tool or just want to see how it works, you can find the full code and a demo below. Just click the run button and after the page loads, press the space bar to watch the sorting process.

Which is faster: bubble sort or selection sort? What’s your guess? 🤔 Then check out this Python visualization to find out. 👇#python #bubblesort #selectionsort #coding

Latest Posts

Bringing Algorithms to Life: A Python and Pygame Visualization Project

What happens when you mix Python, Pygame, and a fundamental sorting algorithm? A powerful visualizer that brings code to life!

Algorithms are the backbone of computer science, but learning them from a textbook can feel abstract and difficult. I wanted a better way to understand how a bubble sort actually works, so I decided to build a visualizer to see the process in real time.

The Challenge of Visualization

Imagine trying to explain a bubble sort without a diagram. You’d talk about comparisons, swaps, and passes, but the real magic is in the movement of the elements. I knew a graphical representation would make the concept click, which is why I turned to Pygame.

The Solution: A Live Demo

Pygame was the perfect tool for this project. Its simple drawing primitives made it easy to represent each number in the list as a colored bar. I connected my core bubble sort logic to the drawing loop, so every time the algorithm made a comparison or a swap, the screen would update to show the change.

What I Learned

This project wasn’t just about the end result; the process itself was a powerful learning tool. It reinforced my understanding of Python functions, conditional logic, and how to manage a game loop. It also gave me a newfound appreciation for the visual side of programming.

The bubble sort may not be the most efficient algorithm, but watching it in action makes its simplicity and elegance clear.

Get the Code

If you’re interested in using this project as your own learning tool or just want to see how it works, you can find the full code and a demo below. Just click the run button and after the page loads, press the space bar to watch the sorting process.

What happens when you mix Python, Pygame, and a fundamental sorting algorithm? A powerful visualizer that brings code to life! Watch this bubble sort animation to make learning algorithms fun and visual. #Python #Pygame #Coding #Algorithms #BubbleSort

Latest Posts

Creating Randomly Generated Spirographs in Python

Using Python Turtle graphics and the Trinket IDE, I built a program that creates completely unique, randomly generated spirograph patterns every time it runs.

This project combines math, programming, and art into something both fun to code and beautiful to watch. And because it runs in Trinket, you don’t need to install anything. Just click the “Stop/Run” button below:


Why Spirographs?

Spirographs are a classic example of mathematical curves. They’re created by rolling one circle inside or outside another and tracing the path of a point on the circle’s edge. In programming terms, they’re a great exercise in:

  • Loops: for repetitive drawing actions
  • Randomness: to make each pattern unique
  • Color manipulation: for eye-catching results
  • Math: especially trigonometry, for calculating positions

How It Works

In my program, Python’s turtle module draws multiple overlapping shapes. Each run of the program randomly decides:

  • How many shapes to draw
  • The angles of rotation between shapes
  • The colors used for each line
  • The speed of drawing

The result? No two spirographs look the same. Every time you press run, you get an entirely new piece of generative art.


Why I Used Trinket IDE

The Trinket IDE lets you run Python code right in your browser, which means:

  • No setup or downloads required
  • Easy sharing – just send someone the link
  • Interactive learning – you can tweak the code and instantly see changes

For creative coding projects like this, it’s perfect.

Every time this Python code runs, it creates a brand-new spirograph – math, randomness, and art all rolled into one. 🐍 #Python #CreativeCoding #GenerativeArt #edTech

Creating a Randomly Colored Spirograph with Python Turtle Graphics

Click the run button ➡️ below to create a new spirograph.

There’s something incredibly satisfying about watching code turn into art, especially when that art is unique every single time you run the program. My latest project uses Python’s Turtle Graphics in the Trinket IDE to draw a beautiful, randomly colored spirograph.

This project is beginner-friendly but still packs in some essential coding concepts:

  • Functions – to keep our code clean and reusable.
  • Loops – to create the repeating spirograph pattern.
  • Random Color Generation – for that “no two designs are alike” effect.

Why This Project Is Great for Learning

Turtle Graphics is a fantastic way to visualize programming concepts. Instead of staring at abstract text outputs, you can see your logic at work. By combining loops with random color choices, the spirograph turns into a dynamic piece of generative art.

The Fun Part: Randomness in Action

Every time you run the program, you’ll get a completely new set of colors and patterns. This unpredictability keeps coding exciting. It’s like unwrapping a little surprise with each run.

Try It Yourself!

You can run this project right in your browser using the Trinket IDE — no downloads required. All you need is an internet connection and your imagination.

Whether you’re teaching Python, learning it yourself, or just looking for a creative coding break, this project blends logic, math, and art into one satisfying activity.

Use Python 🐍 + Turtle 🐢 to create a spirograph in Trinket IDE that draws random shapes and colors every time! 🎨 Loops + functions + a dash of randomness = art. #Python #TurtleGraphics #STEM #Coding

This Chest Doesn’t Need a Key, It Has AI!

Some treasure is locked away with keys.
Some with secret codes.
Mine is guarded by artificial intelligence.

Recently, I set out to build something fun, interactive, and educational—a pirate-themed treasure chest made from cardboard that could open and close on its own. But instead of a simple switch, I wanted to give it a brain. That’s where micro:bit’s CreateAI came in.


From Cardboard to Codeboard

The project began as a simple stop-motion build. I cut, folded, and glued layers of cardboard into the shape of a chest. It had the classic pirate feel: arched lid, gold accents, and plenty of space for “loot.” But the real treasure was still to come: wiring and programming the brain of the operation.

Step 1: Physical Computing
I wired the micro:bit to control a small servo motor, which would physically lift and close the lid. This is where physical computing shines by combining mechanical design, electronics, and code to make something tangible come alive.

Step 2: AI Training with CreateAI
micro:bit’s CreateAI allows you to train a model to respond to real-world inputs. In my case, I trained the system to recognize specific inputs or patterns that would tell the chest to open or close. Instead of a password or button, the AI “learned” when to trigger the servo.

Step 3: Integration
Once the AI model was trained, I programmed the micro:bit to listen for the AI’s signals and activate the servo motor. The result? A pirate chest that reacts like it has a mind of its own.


Why This Project Matters

Yes, it’s a fun build, but it’s also a hands-on lesson in future-ready skills.

Students who work on projects like this aren’t just “playing” with electronics. They’re learning:

  • Physical computing fundamentals: wiring, circuits, and controlling hardware
  • AI & machine learning basics: training models to respond to data
  • Creative problem-solving: taking an imaginative idea and turning it into a working prototype
  • Interdisciplinary thinking: blending storytelling, design, and engineering

The Educational Treasure

AI might seem like an abstract, far-off concept, but projects like this bring it into the real world – literally into students’ hands. They see how algorithms can interact with physical devices, and they begin to imagine new ways to integrate AI into everyday objects.

Plus, the pirate theme sparks creativity. Students start thinking: What if the chest had a security system? What if it played a sound when opened? Could it only open for certain people?

That curiosity is the true treasure.

Take a look at this use of AI + machine learning: a pirate treasure chest that opens and closes on its own, trained with micro:bit’s CreateAI. Physical computing meets the high seas! 🏴‍☠️🤖 @microbit_edu #AI #STEM #microbit

Latest Posts