Showing posts with label python. Show all posts
Showing posts with label python. Show all posts

Sunday, June 2, 2024

STEM Lab 23_24 Round 7 - Wind Whipped Edition

STEM Lab year 9 is coming to a close, and we are definitely finishing on a high note. For kindergarten and 1st grade, this round was a chance to apply their programming skills to a multi-day project. Second grade planned and programmed their first project in the full version of Scratch. In third grade we explored the connections between the fine arts and creative coding. The 4th and 5th graders had their first experiences with text-based programming using the Python language. 

As I have begun thinking about the 10th anniversary of the Sinclair STEM Lab next year, I have also been thinking about how the lab got started. When the task of creating the lab was appointed to me, I was given an extraordinary amount of freedom in terms of lessons, projects, and content. It has been a great deal of work to develop a curriculum for 7 grade levels, and there has been a fair amount of trial and error over the years. Looking back at posts here from the early years of the lab what stands out most to me is how this space has evolved and grown. Credit for that development goes in large part to the students. It is thanks to their ideas, their enthusiasm, their creativity, and their feedback that the STEM Lab is the place it is today. 

Kindergarten & First Grade

I had a number of project ideas that I was considering for this final round, but ultimately my love of incorporating literature into computer programming won out. The students used Scratch Jr to create an animated retelling of a self-selected story. First, I read the class a book and modeled how they would create their story plan. We reviewed the elements of a story, including characters, setting, and plot. Then the students chose a story and created a plan. When the plans were finished, they began working on their projects in Scratch Jr. Most of them had to use the drawing tools to create the characters and settings for their stories. Next they programmed each scene using the broadcast commands to ensure the characters spoke in turn and that the scenes advanced automatically. I was really impressed with how well the students persevered through the challenges. 


Second Grade

In round 6 the second graders made the transition from Scratch Jr to the full version of Scratch. In that round each day was its own project. The students completed a different tutorial every day selected to give them time to practice with the most commonly used commands and structures of Scratch. In this round the students applied what they learned in round 6 to the planning and creation of a multi-day Scratch project with the theme "All About Me". In the final program when the letters of the student's name are clicked the letter changes its appearance and shares a piece of information about the student. First the students made a 3 column chart to plan what each letter would change into and what it would say about them. After that they went to work in Scratch. They wrote a script that set each letter in the correct place and with the correct appearance at the beginning of the program. Then they wrote the scripts that cause the letters to react when clicked. As with the K and 1st grade project, many students needed to draw their own sprites because the thing they wanted to change into is not one of the sprites preloaded into Scratch. 

Third Grade

One of the most important parts of the STEM Lab is making connections between the elements of science, technology, engineering, and mathematics, and subjects like language arts, literature, history, music, and visual art. (The siloing of subjects into individual, unrelated units is one of my greatest frustrations with the way so much of the modern school curriculum is done.)

For this unit, the 3rd graders explored the intersection of art and computer programming. As always we used Scratch. The music extension allows students to compose music, while the pen extension turns sprites into drawing tools that can be programmed to create images on the background. We started with a day of exploration for each extension. Students were provided with a brief step-by-step guide and some starter code that they were expected to tinker with until they had something original. Following that, students designed and programmed a project that included both the pen and the music extensions. I gave them a checklist with a few elements that had to be included (though these were deliberately open end to allow for individual student creativity), but they were encouraged to personalize their projects as much as possible. The studio including all the projects can be viewed here.

Fourth Grade

The 4th graders have done a fair bit of work this year building physical circuits and writing programs to control the behavior of those circuits. To wrap things up, the students were introduced to the Raspberry Pi computer. The Pi is about the size of a credit card, costs as little as $35, and was designed as a tool to make programming and physical computing accessible to all. 

We started the week building circuits with LEDs and buttons on a breadboard. For this step students powered their lights with batteries, so no programming was done. Their previous circuit building experience was evident as the students needed very little guidance to get the lights glowing. By the end of class most groups were asking for more LEDs and resistors and also wanting to know if I had larger breadboards they could use. 

The next day students started with a brief overview of the Raspberry Pi and how to connect their circuits to the input/output pins. The micro:bit used earlier this year has i/o pins as well, so the students all grasped this quite quickly. The Raspberry Pi includes a version of Scratch with a set of command blocks that can be used for physical computing. First the class used a diagram to build a simple LED circuit connected to the Pi. Next they built a short program to blink the LED at 1 second intervals. From there, the students bowled ahead adding LEDs to their circuits and additional commands to their code to create a dizzying variety of blinking patterns. The next day students continued working with their circuits, adding a button, and adapting the program to respond with blinky lights when the button was pressed. 

All of this was a lead-in to introducing the students to text-based programming. With the students feeling comfortable programming circuits in Scratch, I showed them a Python program side by side with a Scratch program with the same output: blinking an LED at 1 second intervals. We discussed which part of the Python code corresponded to the Scratch command blocks. Students returned to their computers with a packet of circuit diagrams and Python starter code. I was, as I often am, truly impressed with how quickly the students picked up on this new skill. Before long they were adapting the starter programs to blink more LEDs using more button inputs than I would have imagined.

Fifth Grade

The 5th graders finished their STEM lab careers with a full unit of text-based programming with Python on the aforementioned Raspberry Pi computer. They split their time between using the Python Turtle Art and Minecraft Pi Edition. The Turtle library is a set of tools for programming drawings and is also used to create games with Python. The Raspberry Pi used to include a version of the game Minecraft designed to be a virtual world students could manipulate with code. This feature is no longer available since Microsoft acquired Minecraft. Fortunately, it is still available to us because we are working with an older version of the Raspberry Pi operating system. As with the 4th graders, I gave the students a packet of sample programs to familiarize them with the basics, and then encouraged them to adapt, alter, and experiment with the programs to create their own unique outputs. They did not disappoint. Their screens were filled with kaleidoscopic Turtle drawings and Minecraft worlds awash in towering pixel art sculptures, lava waterfalls, and TNT produced craters. 

And then came the wind...

I had this final post about 70% written, just needing a few final notes and a few more pictures, when the storm blasted our campus. Suddenly I was back on my pandemic era cart pushing into other people's classrooms and trying to maintain at least some vague semblance of my plans. Mr. Zogg's 2nd grade class was moved to the lab and so to make room for them I was obliged to pack up the Raspberry Pi kits. Some of the projects described above I have been able to implement as planned for the most part. However, I have had to switch gears entirely for the 4th graders. The worst part has been missing out on seeing the last two 5th grade magnet groups and the awesome things I know they would have created with Python. 

It is too early to say at this point what the beginning of next year will look like. I am hopeful, and trying to be optimistic, that I will be housed in the STEM lab once more when August arrives. In a very real sense my class is the STEM Lab's physical space, and when I cannot have class there, some elements of the class are lost. (I would never have students engage the kinds of beautiful, creative chaos we get up to in the lab, with its attendant cardboard scraps and drippy glue, in another teacher's room.) Whatever the situation may be in August, we will meet it with perseverance, creativity, and playful, personally meaningful projects.

Have a wonderful, safe summer. 

Saturday, October 28, 2017

How Fast Can the LED Blink?

This highly unusual school year has settled down to the point where things feel more-or-less back to normal. So I will be going back to my rough schedule of one post every couple weeks, each highlighting the work of a particular grade level. This post starts at the top with 5th grade.

Physical computing refers to using a computer to control the actions of physical objects. It is a chance for the 5th graders to combine their computer programming skills with their knowledge of electrical circuits. The computer gives them more control of their circuits than a typical switch. For this unit, students used the Raspberry Pi computer. It is a low cost, single board device that has all of the functionality of a typical desktop, but with a set of 40 input/output pins that allows users to connect and program components like LEDs, buttons, buzzers, and motors. The Pi operating system includes a number programming languages for students of all levels. We started with Scratch, a block- based programming language with which students are already familiar.




The unit began with an overview of the Raspberry Pi itself, with attention to how it is similar to and different from a traditional PC. Following that, we reviewed the use of components like LEDs, resistors, jumper wires, and breadboards. This group of students used these parts last year, but it was necessary to explain how their use differs on the computer. Over the course of the first week, students worked with partners to build increasingly complex circuits controlled by Scratch programs. The final "test" was to build an LED traffic light and program it to run the sequence from red to green to yellow and back to red at the push of a button. The teams quickly realized that this simple sounding task is not quite as easy as it sounds. Getting each part working in the correct order took more planning than they expected, but each group got their lights going eventually. Then, as usual, they set the wait time to a decimal and competed to see who could get the LEDs blinking the fastest.




Once they were feeling confident with physical computing using Scratch, I introduced them to Python. This is a professional level programming language that is user friendly enough for 5th graders. We repeated the same circuits they had built for their Scratch programs so that they could compare programs that achieve the same end with different means. After a couple of days, most students say they prefer Python to Scratch for physical computing. Some say that it's faster to type the Python than to move all the Scratch blocks around, while others feel like Python is more real. In any case, everyone has done well with their taster lessons on text based programming.




For their culminating project, the student teams returned to Scratch to create some kind of quiz game that incorporated the electromechanical components studied. Most of the teams in this block opted to make multiplication games, and one decided to make a world capitals quiz instead. This was the first of the 4 groups that will come through the lab for this unit and I am excited to see how it goes with the others!


Sunday, December 11, 2016

First Attempt In Learning = FAIL: Picademy Reflections

I spent last Thursday and Friday failing repeatedly, and it was the best teacher development I have ever had! The facilitators encouraged us to fail, they expected it, and were not in the least dismayed when we did. All 40 of us failed over and over, and rejoiced in the freedom we had to do so. However, over the course of the 2 days, all of our failures added up to enormous success. This was Picademy, where F.A.I.L. stands for First Attempt In Learning.

If you are not familiar with the Raspberry Pi, you can check it out here. Basically, it is a small, but versatile computer designed by the Raspberry Pi Foundation in the UK to introduce children to computer science and coding. It comes pre-loaded with several coding languages like Scratch and Python. It also has accessible input/output pins making it possible for students to experiment with physical computing; controlling lights, sounds, and motors using code. We have 6 of these in the STEM lab which have heretofore mostly functioned as extra computers. I knew that I had not been using the Pi to its fullest, but as it does so much, I had no idea how or where to begin with the students. Then I learned about Picademy.

In September I found out that there was to be a Picademy in Austin at the Texas Advanced Computing Center (TACC), I applied immediately and then crossed all of my fingers and toes that I would be accepted. Frankly, my hopes were not too high. Only 40 educators are selected for each session out of hundreds of applications. I was pretty sure that my tremendous lack of experience with computing, educational technology, and digital making would get me a very nice "Thank you for applying, but..." letter. To my immense surprise and joy, on Halloween, I received an email that I had been selected to attend Picademy.

I spent the 5 weeks between that email and this past Thursday and Friday pondering just how out of my league I would find myself when I arrived in Austin.


Day one started with that most Texas of teacher training traditions, breakfast tacos. After a brief overview of the coming days and introductions all around, our facilitators taught us the Picademy motto: FAIL. They warned us that we would make mistakes, that we would feel overwhelmed, and that we may feel uncomfortably out of our depth. However, a fail, we were constantly reminded, is just a first step in the learning process. Assured that we had the freedom to fail, and that we would have the support to keep trying, they lobbed us into the deep end of computing with Raspberry Pi. We blinked LEDs with Scratch and Python, first one, then a set of traffic lights. We made music (or in my case discordant noise) using Sonic Pi. In Minecraft Pi we teleported, built towers, and turned everything we touched to gold with Python. With the Pi Camera we took pictures and movies, we used the Explorer HAT to drive motors and control more LEDs. And, and, and!


PiCamera photo booth

That afternoon, we toured the Texas Advanced Computing Center which was amazing. It is part of the University of Texas and is home to some of the fastest computers on Earth. Most are used to run simulations and forecast models of events like hurricanes, black hole collisions, and chemical interactions between materials. They have projects dealing with machine learning, public health issues, and genetics. It is a fascinating facility.

PiCamera photo effects
Our final assignment on the first day was to brainstorm project ideas. The second day of a Picademy is largely devoted to applying what one learned on day one to a project of some kind. This proved to be a tough task as I was in the throes of a full scale information overload. I was trying to think of a project that I could work on that would, in some form, be within the abilities of the the students I teach once they were more familiar with the Pi. Still, I did what I could to think of ways to apply my learning and hoped that I would be able to remember enough of it to use on Friday.

Day 2 started with some amazing speakers. Marc Scott talked about the open source educational resources movement. Amanda Haughs discussed using Raspberry Pi in the K-5 classroom. We heard more about the work done at TACC from the director, Dan Stanzione. Finally we heard from a 14 year old entrepreneur from Houston, Ethan, who started his own computer company, PCs for Me. He sells Raspberry Pi starter kits and accessories. Ethan talked about some of the projects he is using Raspberry Pi for in his classes this year.

After that healthy dose of inspiration, it was time to form a team, select a project, and get started. Matt, our lead facilitator, likened it to one of those cake baking competitions they have on TV. Teams would have 4 hours to work. At the end of that time, they would have to transport their project to the auditorium and present their work to the rest of the cohort.

Whiskers ready to dispense teaching wisdom
I was lucky to have my partner in all things also be accepted into Picademy (something that we never thought would happen). We had worked out an idea that morning as we drove to TACC. Our aim was to build a robotic virtual teaching coach who could dispense advice any time a teacher might need it. When they gave the word, we grabbed some art supplies, an Explorer HAT, a couple motors, and a handful of jumper wires and got started.

We elected to use Scratch as our programming language because it is something with which we and our students are very familiar. The Explorer HAT was selected because it can be programmed using Scratch, and can control both LEDs and motors simultaneously. To summarize the process, there was much failure. Our code needed a fair bit of debugging before it functioned to our liking. We needed help from just about every facilitator in the room and several cohort members as well to find the correct commands to light our lights and move our motors. Then there was the actual construction of Whiskers and his mountain top temple of educational wisdom. We did not have time to get all of the sound effects in that we wanted, but in the end we were pretty happy with our work. Whiskers asks for the user's name and then offers them a chance to ask a question. He then thinks for a moment and says helpful things like, "Let's talk about that in PLC next week", "You're an amazing teacher, you've got this", and "Have you tried Donors Choose?".
Set up and ready to share our project

The other presentations were great! There were several projects that used Twitter. One tweeted when a program monitoring temperature reached a certain level. Another took a picture and tweeted when a student left class for the nurse, office, or restroom. There was even a motion activated classroom pet movement camera that sent tweets. There was a Minecraft project that used the Sense Hat to search for gold underground so that the player would know where to dig. Another Minecraft project used the Pi Camera to take a picture and then rendered it in Minecraft blocks. One group built a station for creating audio books, another gutted a stuffed bear and fixed it to play lullabies and take pictures when shaken, and one built an Explorer HAT controlled scribble-bot. It was truly inspiring to see so much success after all of our first attempts in learning. Frankly there were too many amazing things to describe them all here. You can watch them all here. FYI, the movie is about an hour long.

After all teams had presented, we were officially recognized as Raspberry Pi Certified Educators. We took turns walking to the front to be presented with our certificates and pins to the stately strains of Elgar's "Pomp and Circumstance". Then it was time to pack up and head for home. I cannot say a big enough thank you to the whole Picademy team. Matt, Marc, Amanda, Matthew, Courtney, and Venus, along with the wonderful people from TACC, made this one of the absolute best trainings I have ever had the pleasure to attend.

My brain is still a little bit overloaded with ideas that will need to be tamed and organized over the coming days. I am already working with other participants from the Houston area to have a get together in January so that we can continue to inspire and help each other to move our Raspberry Pi plans forward. The people were pone of the best parts of Picademy. There are so many dedicated, brilliant, and inspiring educators out there that I am so excited to learn from. For the classroom, I am working on Pi lessons for my after school clubs having gotten so many great ideas about where to start. I am working on developing a unit to teach to my 5th graders during the 4th nine weeks. Lessons learned from that experience will help me to adapt the unit for 3rd, 4th, and 5th grades next year. Doubtless more ideas and plans will follow as I continue to reflect on Picademy and engage with the wider Raspberry Pi community.

If you are a teacher looking for the best STEM training around, go to the Picademy USA website and register your interest. They are hoping to hold 7 or 8 Picademy USA sessions in 2017.