BeetleBlocks Tower

My math students are coding a tower in BeetleBlocks.  This is a project that I have wanted to do since a 4th grader last year designed a tower in BeetleBlocks. He called it the Sears Tower.

Sears Tower

4th grader designed  Sears Tower

I set up the engineering project with the following constraints:

Engineering Task: Use the Shapes menu blocks cube and cuboid to build a tower.

Constraints: 1) You must use at least 5 Shapes blocks. 2) Each shape must stack on top and be smaller than the shape below (no overhanging blocks) 3) The total height must be 100 mm or less (but greater than 80mm) 4) the base must be 35mm x 35mm

When I introduced the project I said we would use the Engineering Design Process  (Ask, Imagine, Plan, Create, Improve).  I explained the constraints and let them ask questions. They would need a written plan of their design with a bit of pseudocode* before I would let them on the computers.

(*I used the word pseudocode and one student thought I said Sudoku.)

Drawing from the Center

Next, I explained a bit about how the beetle draws the shapes from the center.  This is the big concept for this project.  They would calculate the center height, move the beetle, draw the cuboid, move to the center of the next cuboid, etc.   I modeled an example of a plan and pseudocode on graph paper:

OLYMPUS DIGITAL CAMERA

Pseudocode on the left, block tower start on the right, z height line in the middle.

One thing I learned was drawing the model in 3d wasn’t necessary, in fact, it was probably confusing.   The students’ models were easier for all of us to understand if they drew them in 2d and just concentrated on z height and moving the beetle to the center of the next cuboid.

We spent the rest of the class period working on their plans. One student was going to use a repeat block and make a tower of all the same blocks, so I had to change the constraints to specify 5 *different* cuboids.  A number of students were stuck on the calculations from the center.  I suggested they move to the center, draw, move to the top, move to the next center, draw, etc, breaking the problem up into smaller parts.

The next time we met I reviewed BeetleBlocks coding and suggested they use Wireframe to see inside and the beetle at the center of their block.  BeetleBlocks also displays Position (the 3-d coordinates) of the beetle, so they know the z-height.

Screen Shot 2018-05-28 at 9.36.18 AM

Partially coded tower and wireframe displaying beetle at the center of the upper cuboid.

If they were happy with their paper plan they could go right to BeetleBlocks. About half the class finished their coding by the end of the class and I’m busy printing towers on our little Printrbot Play.  Another thing to note is that the minimum size of the cuboids should be 3 mm for ease of printing.

A few of them will need improving before theirs will be printed.  I noticed a few cases where the blocks were nested not stacked on top of each other.  This tells me the student is not coding z-height correctly, which is the concept I am trying to teach, beyond calculating centers of cuboids.

Screen Shot 2018-05-28 at 9.47.36 AM

Nested blocks showing me the student hasn’t coded z-height correctly.

Set versus Move (Change)

There are two different ways to code the beetle to change z height.  One way to set the beetle to a specific z coordinate and the other is to move or change z by a certain amount.  These are two different perspectives to use and I let them choose which way makes more sense to them.  Set versus change statements can be confusing when programming and cause unexpected results.  Here we can look at the model using the wireframe setting and see what is happening.

One student is making a pyramid of blocks, each block 1 mm smaller (width, length) and 2 mm in height than the previous.  He is hard coding each block.  I’m going to suggest he use a repeat block and a variable.

Screen Shot 2018-05-28 at 9.53.41 AM

Code suggestions on the left for the pyramid making tower code on the right.

This project is turning out well and I’m learning a lot along with the students. I can print each one in less than 2 hours by setting the infill to 10% and cranking up the speed.

I’m surprised no one has created a double tower or thought to rotate on the z-axis to give the tower a bit of twist.  Dare I suggest these things?

Advertisements

Your Name in BeetleBlocks

In December my school’s PTO approved my grant for a 3D printer. Yes!  Now we can print 3D artifacts using BeetleBlocks.  My idea for the 4th graders’ first project is to design a 3D model of their name using BeetleBlocks code.

20161210_141806

School name printed by school printer using Beetleblocks code

I started with one of my math enrichment groups first. They were my small group test of the idea. This group has played with BeetleBlocks but most recently had been making math games in Scratch.

It only takes about 5 blocks of code to write your name and make a cuboid to keep all the letters together.  It takes a little bit more time to make decisions about the size of the text, the size of the cuboid and where you want to put the block that keeps the letters together.

screen-shot-2016-12-28-at-6-54-32-am

basic code stub for project

I gave them the constraints that their name had to fit on the BeetleBlocks grid (20 by 20 ) but they could have their name with the support cuboid behind or below.

Screen Shot 2016-12-28 at 7.25.50 AM.png

Name on grid with support cuboid below

The technically difficult part was getting the STL files saved where I could access them and that only had to do with the way our computers are networked.

20161216_204842

3D print of name with cuboid behind

The students were really excited about everything and just wanted to sit around the printer and watch it print.

20161216_142746

I was able to print three names at a time. I would have been able to print all nine students names in the time allowed, but I got cocky and changed filament in the middle and that caused a jam that I was not able to resolved before the end of the day.

20161216_213419

3D prints in MakerGeek’s Crystal blue PLA 

You have to understand that the printer arrived at school on Monday and we were printing this project on Friday. On Monday, the 4th graders voted on the filament color for their grade (Crystal blue, by the way) and on Friday, during the middle of printing, the filament arrived!

Based on this experience, I made a one page handout 3d-model-your-name-in-beetleblocks for the next time.  The next group to try this will be the rest of the students in this class.  These first nine will be my experts and help the rest of their class code and export their models.  My goal is to have all three 4th grade classes code and print a 3D model of their name.  Then I’ll try it with the 3rd graders.

The only curious thing I’ve found with BeetleBlocks is the rotational changes that I have to either code up front or adjust in Cura (printer software) to get the correct orientation for printing.

screen-shot-2016-12-11-at-8-36-21-pm

Strangely, when I save the model on the left, it will import into Cura with correct orientation for printing.

 

Details about our 3D printer:  The grant was for a $400 Printrbot Play.  It is a small printer with a small print bed size – 100 x 100 x 120 mm.   The Play received a few nods from MakeMagazine and 3Dprint.com 3D printer guides. I also have 2 years of experience with Printrbot printers – we have a personal Printrbot Simple at home.

20161216_141121.jpg

If Math Games, Then Hour of Code

Computer Science Education Week is upon us and my first batch of 4th grade Scratch math games are shared.  More will be completed tomorrow.  3rd graders have also been working on math games within my Scratch teacher account. I need to post those on our school website, too.screen-shot-2016-12-04-at-7-39-55-pm

I’ve been noticing a subtle misconception showing up with how my student are using the ask and answer blocks in their math quiz games.  When introducing the ask and answer block, I state that the two blocks work together. I talk about how the ask and wait is a Sensing block and is waiting for the user to type something and that something is held by the answer block.  I specifically say that these blocks come in a pair because I’ve had other issues with students type “answer” in the operator instead of using the answer block.

screen-shot-2016-12-04-at-7-26-27-pm

 

This year, I guess, the students have more complicated scenarios with multiple Sprites in play.  They set up one Sprite to ask the question.

screen-shot-2016-12-04-at-8-20-58-pm

and another Sprite to face the consequences of a right or wrong answer.

screen-shot-2016-12-04-at-6-57-26-pm

The logic seems okay unless you realize that other Sprite is not waiting for the input.  That is subtle for them to understand.

I realize that the answer block is a global variable and can be separated from the ask block. The code below works on a separate Sprite from the one asking.

screen-shot-2016-12-04-at-8-08-30-pm

However, my solution for the students was to create two broadcast messages: “correct” and “incorrect”. The broadcast event block is a powerful tool and a good block to get to know. Fourth grade teams were able to work on separate Sprites and code the ask/answer decisions in one and the receive broadcast events in the other and put them together to make cool projects.

screen-shot-2016-12-04-at-7-38-18-pm

 

Then, of course, there is what happens when you show a certain 4th grader how to make random math fact variables:

screen-shot-2016-12-04-at-6-54-49-pm

Yikes! I’m not sure how Scratch does it, but I love the fail soft aspects that make this a super awesome programming platform for kids.

More about Hour of Code as the week progresses.  I’m really looking forward to the week’s events.

Scratch Teacher Accounts

I’m testing out the new Scratch Teacher Account option with the 3rd grade math class that I am working with.

screen-shot-2016-11-08-at-9-32-07-pm

The class is using Chromebooks so using Scratch 2.0 offline editor was not an option this time. Luckily I knew that Scratch was offering teacher accounts – I was there when they announced it at the Scratch@MIT Conference 2016.

It wasn’t difficult to set up my teacher account. After I was approved, I had to come up with 20 student account names. I wanted ones that had an easy pattern, were easy to spell, remember and would not identify the students in any way.  I chose a “color-Sprite name” pattern, for example “bluegobo”.

Once I had all 20 accounts set up in my class, I printed out the account names, cut them apart, put them in a jar and had the students draw a random one out.  I have recorded their names & account names together in case someone forgets, and for grading.

After we got logged into the Chromebooks and into their accounts, we started with some of the lessons I did last year with 3rd graders (see 3rd Grade Scratch Game Makers).  I introduced drawing their initial with glides on the coordinate grid earlier than last year and they struggled with both their unfamiliarity with the program and with coordinate grids. I was somewhat disappointed with how the lesson went. I did more troubleshooting than I expected. After the hour lesson as over, I thought I would be able to see their projects but I realize now that I can only see projects they share.  I didn’t think we got far enough in the coordinate grid project to have time to talk about sharing their projects.

I missed a week, but their math teacher had them work in their Scratch accounts even with me not there. She had them create a Halloween scene and said she was impressed that they were able log in and to make the Sprites move around.  I’m impressed that she had them do Scratch without me. But it was a perfect segue into our Trick or Treat lesson on decisions in programming.

This time I remembered to save enough time for them to share and show their projects.

I know some of them didn’t feel they had enough time. But everyone enjoyed seeing their project playing out on the front board.

Note: no one noticed (that I heard) that what you type in has to exactly equal the answer for the “if” part to work.

 

3rd Grade Scratch Game Makers

Screen Shot 2015-12-20 at 9.31.58 PM

The 3rd graders that have been learning Scratch really came through during Computer Science Education Week and produced 11 goofy and wonderful little math games.  Last week we took the time to reflect and give feedback.  I am really impressed with their coding and want to jot down the lessons that occurred so I can repeat this again if I get the chance.

Here’s the list of lessons:

1. Intro to Scratch (Sprite, Stage, events, move, looks) -the basics introduced, time given to explore.

2. Etch-a-sketch (more events, pen)

3. Trick or Treat (if-then-else, ask-answer)

4. Draw Your Initial (coordinate system, glide, pen)   -for this lesson I had in mind to teach the Scratch coordinate system where (0,0) is the center of the screen.  I had them pick a Sprite of their choice and code it to glide around in the shape of their first (or last) initial.  I modeled gliding in a square while they followed first.Screen Shot 2015-12-20 at 9.04.32 PM

I handed out half sheets with the scratch grid on it so they could draw out their initial, figure out the coordinates then add the glide blocks.  Pen down and repeats were added at the end for extra flair.

5. Math game design outline (design sheet)

6. Math game coding (Pair programming)

7. Sharing and giving feedback

My expectation was that they’d code one math questions with two different outcomes like the Trick of Treat lesson.Screen Shot 2015-12-20 at 9.32.12 PM

Only this time they were working in pairs and had to come up with their own theme and math question.  They worked on it for almost two math sessions and then I put them up on the Scratch website.

Screen Shot 2015-12-20 at 10.01.57 PM.png

 

Last week they got to play all the games and give each other feedback. One student thought they were going to get to rate the games and he declared he always gives bad ratings to online games.  Instead I handed out sheets for them to give each game “2 stars and a wish” (This is something I came across in a FutureLearn MOOC on Teaching Computing)

20151220_214303.jpg

Giving good feedback is actually a lot of work.  I asked them to play each game twice, one time get the math question correct and then play it again and give the wrong answer.  Then they had to find two things they liked about the game and one thing they wished it would do differently.  I enjoy this feedback part of the game making.

Oh yeah, 4th graders made math games, too. What a difference a year and a bit of Code Club does to the complexity of the games made.  They also worked on giving 2 stars and a wish feedback this week.

Trick or Treat

Today was the second Scratch session with a 3rd grade math class and it was a blast.  Last week I introduced Scratch to them and they also tried out the Etch-a-sketch project from Simon Haughton’s Scratch Progamming lessons.   Some of them spent some time during the week playing with Scratch during free time in math class.

This week I wanted to introduce the “ask and answer” blocks and “if-then-else” so I came up with this Trick or Treat lesson, just in time for Halloween.

First I verbally asked them “Trick or Treat?” Most of them said, “treat” of course.  Then we brainstormed what a “treat” would look like in Scratch – do something (animation), change the costume, say something, play a sound.  They of course had big ideas like candy falling from the sky or the Sprite eating a pile of candy.  I tried to translate that into more programable language.  Then we brainstormed what a “trick” would look like.

I showed them my sample project where a ghost asks “Trick or Treat” and if you say “treat” he turns into a bowl of cheesepuffs otherwise he turns into a scary ghost.  I also had different sounds and a bit of animation (the Sprite turns and grows).

Next it was their turn. I directed them to picked a background for the stage and a Sprite.  Their choice.  We had a lot of ghost and ghouls, but quite a variety of backgrounds.

Screen Shot 2015-10-27 at 9.25.50 PM

Then they asked the question “Trick or Treat?” and set up the answer to equal trick or treat.  Also their choice.Screen Shot 2015-10-27 at 9.28.58 PM

We tested it and they noted it didn’t do anything. Well, not yet.  So we added a “say” block for each condition depending on if what they were looking for, trick or treat, and the opposite in the else clause.

Then I had them add two sounds, one for each condition.  In hindsight, I should have saved the sounds for last as noise level went up both from excitement and the random sounds playing in the room.

Screen Shot 2015-10-27 at 9.08.07 PM

Finally we added some costumes to the Sprite, one for each condition.  (There was a bit of confusion here because we weren’t adding more Sprites but costumes to our Sprite.)

Screen Shot 2015-10-27 at 9.41.58 PM

That was it, with just enough time to share their work. Their math teacher suggested this and it turned out to be a great idea. The projects were saved in a shared directory and all the laptops were closed and I displayed each project up on the screen for all to enjoy.  When it was their turn, I asked the project creator if they wanted me to answer “trick” or “treat” first, then played both cases for all their classmates to see. Screen Shot 2015-10-27 at 9.21.32 PM

I’m very pleased with how this project went with this group of 3rd graders.  I would definitely do it again- just have them add sound last.

Like a Dream

I taught so many hours of code yesterday that I dreamed in code.  (It was the only way to move in my dream.  Thanks Anna & Elsa.)

Code.org puzzle with Frozen characters

Code.org puzzle with Frozen characters

But it was an awesome day.  Three classes of Hour of Code 2014 activities from Code.org, Tynker, & Code Kingdoms for 2nd and 4th graders plus two classes of Scratch and then Code Club after school.  A few 4th graders were with me for couple of these hours, too. I wonder if they dreamed about coding too?

For Computer Science Education Week, or “Hour of Code” week, I had the 4th grade math group I work with write math games in Scratch.  The project idea comes from the Scratch resources on Computers for Creativity‘s website.  The students were paired up and given two math periods to work on the project.   I showed them the two math games that students had made last year:

4th grade math quiz game in Scratch, 2013

4th grade math quiz game in Scratch, 2013

Screen Shot 2014-12-11 at 8.28.20 PM

4th grade math quiz game in Scratch, 2013

I handed out a one page project outline form and a print out of the guidelines to each pair.

Math Scratch Project Outline – Google Docs

With not very much time to work on it, I warned them to keep the project simple.  Get the game working with one math question, then build on it. I also made sure there was a Code Club member in each pairing, so at least one person had some knowledge of Scratch. I then I let them go.

I set their teacher up on Scratch online and he started a math game himself.  That was Monday.  Yesterday my plan was to have them finish up. My friend and co-worker in this class suggested they might need more time.  She had gone home and tried to make a Scratch math game and had some questions.  (How cool it that?  I’ll have to give both adults their “Hour of Code” certificate.)  But it is true,  I did give the students a big, creative project and only a little bit of time to do it.  From what I saw on Monday, only a couple of pairs were making their game too complicated and or not working well together.  We decided to conference with the each pair during the period to see if they had questions, needed feedback and as a general check-in to see if they were going to make the deadline.  First, though, the students “conferenced” and helped their teacher with his math game.

By the end of math on Wednesday, most of the groups were very close to having a working game.  We decided another half period might be warranted.  Then we’ll share them and try them out.

I heard one student say this coding stuff was great and he wanted to sign up for the next round of Code Club.

Oh, yeah, Code Club was great too. Everyone busy working on their own games.  Recording their voices.  Being successful, or at least satisfied, in drawing their sprites and backgrounds. I really enjoy troubleshooting Scratch projects and seeing all the creative and interesting ideas these 4th graders have.  My volunteers are really great, too.