In this activity guide, you will learn to program an infrared remote control to change the color of lights on a NeoPixel strip.
Total read time: <7 minutes
Skill level: Beginner
Street Corner STEAM
On Wednesday evenings, I lead a free STEAM activity in a location that also serves free meals. Activities are designed for 10-12 year old students, but in reality we have five-year-olds through senior adults who attend. There are three activity tables: sewing, painting, and drawing, as well as one special project I bring each week – such as this one. The goal of Street Corner STEAM is to offer socially-distant and spontaneous play to build skills and confidence with technology. Below you will see pictures from Street Corner STEAM.
When you attach the NeoPixel strip and infrared sensor, be sure to line the black wire up next to the letter /G/ which stands for ‘ground.’ If you plug the wires in backwards, your program won’t run properly. Make sure the slide switch on the basic:bit is set to ‘P0’, not to the speaker.
Get to know your materials
Connect your micro:bit via USB to your computer.
Open MicroBlocks and be sure you have a green circle in the top left corner.
Add the NeoPixel library to MicroBlocks.
At this point you can play with the NeoPixel library. Below is sample code I shared with the students in Street Corner STEAM. With these code snippets, they were able to create new scripts.
Infrared sensor and remote control
Infrared light is invisible to the human eye, but if you look at it through the lens of a video camera, including most cellphone cameras, you can see it. Below is a way to use the remote control with your NeoPixel strip.
Use physical objects to control digital animations and sound
Use math (you won’t realize you did)
Use music (you’ll probably realize you did)
What you get
Three ways to help Pete find his beat using micro:bit, MaKey MaKey, and Scratch
Loads of supplemental teaching resources for music, coding and Scratch 3.0
Most people don’t know this, but there is a reason Peter Cottontail always came hip-hoppin’ down the bunny trail.
He was a famous DJ, and he loved to make music. Though the secret to his music lived in his tail.
One day a terrible DJ accident happened and Peter lost his cottontail.
Now he is just known as “Pete who lost his beat.”
Can you help Pete find his beat?
Part 1 – Make Pete, micro:bit glove, and MaKey MaKey dance pad
Pete: 1 sock, fist-full of stuffing, two rubber bands, and scissors
micro:bit glove: glove, binder clip, micro:bit with battery pack
MaKey MaKey dance pad: 1 file folder, aluminum foil (about the size of half a sheet of computer paper), glue, scissors, MaKey MaKey
First, make Pete.
Pete is just a sock bunny. Follow this tutorial to make your own. If you don’t like this tutorial, search “No sew sock bunny” to find many versions. You can also search “No sew sock animal” to finds lots of other creatures to make with a sock.
Materials: 1 sock, fist-full of stuffing, two rubber bands, and scissors.
Glue a piece of foil onto the bottom of Pete. This will help him to dance on the MaKey MaKey dance pad.
Second, make your micro:bit glove.
Materials: glove, binder clip, micro:bit with battery pack
But, have you ever tried to mount a motor into toy stuffing? Making a squishy toy that has motors inside isn’t easy. Below is the story of how I tried – and am still trying. I didn’t have directions to follow. I just knew that I wanted a plushy bunny that would “look around” like a real rabbit.
For each idea in this process, I tried lots of other ideas before I moved on to the next idea. Also, sometimes I got on an airplane in between ideas because I travel a lot for work. (Those photos are below, also.)
My goal is to create a simple robot plushy that mimics life-like behavior. If you have shareable resources on this topic, please email them to me email@example.com. I’d love to see them (and share them in the next blog post.)
This 14 second video has music.
Key Ideas I’ll Try Next Time
Insert electronics from the tail of the bunny, not the head.
Try attaching the head separately and last. This might make for a more emotionally appealing face because you can get the details right before attaching it.
Use fabric that doesn’t shred easily. Felt or wool might be a better option than what you see in my photos. (I used micro felt because it was extra soft. I thought it would move nicely with the micro servos, but it ended up just fraying easily at the edges.)
Try micro servos with plastic gears instead of metal gears to save a few dollars.
First, I started with a simple cardboard version. (Hey, it looked like a rabbit to me.) I programmed it in MicroBlocks.
Well, that was easy enough. I put a picture of the MicroBlocks bunny Rosa on the front and called it a day. That was all I had time for before I went to FETC in Miami, Florida for work.
Once I returned from FETC, I had to go to the BETT show in London right away. So, my bunny project waited a few more days.
Once I got back from BETT, I had a new idea to try. I chopped up a memory foam pillow, and made a servo shelf with 2 pieces of 10 mm Eva Foam. The Eva Foam securely held my servos, but the servos weren’t strong enough to move the 2mm black foam (AKA: future bunny face) the way I liked. So, I ordered micro servos with metal gears, thinking they’d be stronger. (This may not have been necessary because the most recent design I’ve used is fairly small and light weight.)
Also, memory foam is difficult to cut without special tools. Of the tools I had available, a bread knife was the best solution.
After I tried that idea, I had to pack my suitcases again to go to TCEA in Austin, Texas. TCEA was a strangely green trip.
After one of our morning meetings, I started working on the code for my future rabbit. I knew I wanted to use the radio feature of the micro:bit to wirelessly send messages from one micro:bit to another micro:bit, in order to control the servos. Below is the program I wrote.
During the class we taught, I managed to find a few minutes to try making another type of bunny head.
Once I got back from Infosys Winter Pathfinders with John, I was ready to dive into my project because I had 8 full days before traveling again.
First, I decided that I had a good concept for stabilizing the servos with Eva Foam from the memory foam rabbit.
This is a soft and durable way to stabilize the servo motors, so I decided to keep it.
Next, I decided it was time to get a real pattern. I knew I wanted a plushy rabbit, so I searched free rabbit patterns. I chose the pattern below because I thought the servos would fit well in the neck. (I noticed that the distance between the base of the rabbit and it’s neck was similar to the height of my servos stacked on top of each other.) So, I traced the pattern and cut out the shapes from my fabric.
Even though the directions showed me how to stitch these pieces together, I still had to figure out how I was going to insert my motors. I also needed to figure out how I would attach the motors to the rabbit itself.
Next time I will NOT insert the motor in the front (as I tried here). Next time I will stitch up the front of the rabbit and leave the back open. There are several seams on the front of the rabbit, and trying to stitch them together while holding the motors in place was very tricky. This trickiness combined with the fraying fabric makes the front of my first-draft rabbit pretty raggedy.
Here’s what happened. (The black thing sticking out of the side when the head turns is a piece of 2mm foam. You’ll see more about that piece below.)
Fourth/ Some Things I Did Next
See how well it works?
So this is what went inside of the rabbit’s body.
Yes, it’s a bit floppy outside of the rabbit, but once it goes inside, it seems to work okay. There is definitely room for improvement in this form.
Programming My Rabbit
Once I sealed my servo motors inside of the rabbit, I didn’t know how exactly they would move. Using MicroBlocks was a good choice for me because I could quickly make changes to my program. I needed to find out how far my rabbit’s head could move without looking crazy, or worse, falling apart. By using MicroBlocks, I could test in real-time (no waiting for something to download) the range of my servos inside of the rabbit.
Pressing A on the micro:bit causes the rabbit to rest. Pressing B on the micro:bit creates a random rabbit movement. My next step is to make these radio controlled features so that I can remove the wires (as you saw in my example code above.)
This 14 second video has sound.
Need More Resources
If you have shareable resources on the topic of simple squishy robots, would you please email them to me, Katie@katiedays.com? I’d like to learn from them and include them in my next blog post.
”We have to make safe places for students to take creative risks, and trust students in those places.”
I remember taking a risk in 6th grade art, though at the time, I didn’t know I was. Using British English to title my drawing “Colour Tower” made perfect sense to me. I was reading the Chronicles of Narnia at the time, and thought it was cool how the words were spelled differently than I was used to. The word “colour” felt exotic to me – like much more vibrant colors emerged when you spelled it that way.
As soon as my “Colour Tower” was hanging in the hallway at school, the disgusted-sounding taunts began. “Doesn’t Katie know how to spell? That’s stupid.”
I never had a chance to explain myself, and I didn’t want to. I felt embarrassed and ashamed. I stopped spelling the word color with the letter U, and my world became a little less bright. For girls, creative risk-taking in middle school can be wildly terrifying. But, some girls don’t just stop using the letter U to spell new words in middle school – worse things happen. They can stop leaning into their academic talents and using the power of their minds coupled with the power of their hearts. Their true passions can become secretive and hidden. They sometimes stay locked for years, or never get unlocked at all. That’s painful.
I think I was one of these middle school girls, too. How was I ever going to lean into my own talents, when I was obsessed with matching what I saw everyone else doing? It was easier to conform than to try something new and risk feeling embarrassed.1
How can we help more middle school girls feel confident to take creative risks?
We have to make it less unusual for a middle school girl to do something different from her peers, and that starts with us doing something different for our students. We have to make safe places for students to take creative risks, and trust students in those places.
While I don’t believe tools themselves solve the problems we are talking about, trusting students to take creative risks with tools they may never before have used can have a profound impact on their life.
You don’t always need tools to help inspire confidence, but there are some good ones that can help. They are beginner-friendly and cost as little as $15 per kit, but the possibilities are endless. They rely on students’ minds and hearts to bring them to life.
Having said that, I did want to be a spy in 7th grade. For a while I carried around a bag with a 110 film camera, mirrors for looking around corners, and a notebook. Mostly I did this with my best friend in her forest, but once I brought the bag to school. Although no one knew I was a spy. Because, well, that was the point. [↩]
The micro:bit is a tiny programmable computer that makes STEM, computer science, and coding easy and fun. With this one device, students can start taking creative risks in nearly any subject. Check out www.microbit.org for free lesson plans and student project ideas.
Why use MicroBlocks?
MicroBlocks is a small, fast, human friendly programming language specifically designed for tools like the micro:bit. MicroBlocks is perfect for libraries, maker spaces, and anywhere with lots of people and resources coming and going.
Just plug your micro:bit into your computer, open MicroBlocks, and click the gear icon to “update firmware”. That’s it. Double-check to make sure the USB icon has a green circle behind it to show the connection is good. (See it in action below.)
You can do a lot with the buttons, sensors, and display built right into the micro:bit, but you can also do more by adding accessories. The basic:bit is one way to easily add accessories.
Attach your micro:bit to the front of the basic:bit with 5 screws that come with the basic:bit. (See photos below.) Use the same battery pack that came with your micro:bit to power it all. MicroBlocks makes it easy to start programming your basic:bit instantly.
Attach your NeoPixel strip to the basic:bit. The MicroBlocks NeoPixel activity card makes it easy to learn. Because the basic:bit comes with a piezo speaker built in, try using the sound and NeoPixels together. The MicroBlocks sound activity card will help you.
This project was made using the winch and crank build videos at the BirdBrain Technologies Build page. This puppet uses two position servos: one in the eyes and one in the mouth. The MicroBlocks servos activity card makes it easy to get started with servos. Also, this puppet is being powered by the ring:bit instead of the basic:bit. You can make a puppet with a basic:bit, but the extra battery in the ring:bit will help your puppet last longer. However, the ring:bit doesn’t have a piezo speaker built in like the basic:bit does.
Add at least one position servo to bring your puppet to life. Consider using a ring:bit instead of a basic:bit to add more power to your puppet (The ring:bit doesn’t have a piezo speaker built in like the basic:bit does.)