A gif of the micro:bit simulator

I just found this post in my drafts, last edit September 2023, the bug mentioned is still there and I think it is worth remembering the creativity shown by my class.

For the past couple of weeks, we have been working on a micro:bit project in class. One of the interesting aspects of working with a diverse group is the need to introduce new ideas and topics to the class, especially when some students already have experience in the area. This year, my class is Primary 5, 6, and 7. The Primary 7s have already had some exposure to micro:bit and other block coding environments.

I decided to focus on the virtual pets project from the makecode site for our first project. In my classroom, we use the micro:bit app on our iPads for coding, and it and the micro:bits has had a couple of useful improvements. Since the last session, the ability to download data to the iPad has been introduced, although we haven’t explored it yet, but I hope to do so soon. Another improvement is a simpler method for resetting the micro:bit when connecting via Bluetooth, making it more accessible for smaller fingers.

I introduced the topic by discussing Tamagotchi pets, which I remember being popular in my class over two decades ago. The virtual pet project is a lot simpler in comparison, with just two features: when a pet is stroked, it smiles, and when it’s shaken, it frowns.

The limited functionality left plenty of room for exploration for the 5 primary 7s with experience. Leaving plenty of time for me to make sure the others managed the basics, linking to. Micro:bit flashing code etc. I did drop the words food and health into the conversation but didn’t go any further.

We ended up having three sessions with the micro:bits and I was delighted with the results. Between them the sevens recalled variables from last year and were off. We ended up with pets needing fed to avoid death, being sick if fed too much and getting annoyed if they were petted too much. The younger pupils managed the basics and extended them in simpler ways, animating chewing and drinking or reacting to different buttons.
One primary six who had previous experience did just as well as the primary sevens, his pet had these features:

  • Sleep
  • Be happy if stroked (press logo)
  • Be sad if shaken
  • Die (wait long enough and don’t feed it)
  • Be sick if fed to much(can be cured using b)
  • Be scared (by making a noise/blowing/filling the red bar 180+)
  • Be fed (using A)
  • Get a health check (A+B)
micro pets on the Banton Biggies

The first three were part of the class instructions, taken from the make code site, the rest were pupil ideas.

Of course lots of mistakes were made along the way, but it was great to see solutions worked out, shared with neighbours and lights go on. Quite a few pupils used wee bits of free time to explore and test ideas completely independently.

On Friday we went to post on our e-portfolios about the work and embed your pets in the blogs. Editing the shortcode to do this is a bit tricky and we also ran into a problem with the simulator not embedding properly. Half the micro:bits were hidden. At first I thought this would be a problem with Glow Blogs, but later investigation showed it to be a problem with the makecode code. We workaround it by embedding the editor rather than the simulator. I do hope the makecode folk sort this out. Since it affects their documentation too I expect they will.

I continue to be a micro:bit fan and will be using them throughout the year, hopefully incorporating it into our makerspace projects too.

Montage of screenshots of three sites mentione in post.

I am a fan of micro:bits too, these look like great lessons, nicely packaged. CC BY-NC too.

I’ve mostly been avoiding Twitter/X recently, but I still get emails. This looks like it might be fun in class.

I don’t really do much with spotify either, but looking for a poetry podcast I found this one and enjoyed this episode.

I really like the iOS micro:bit app as do my class. I was intrigued by the data feature when it came out but had not used it. Delighted to see this:

Fetch MY_DATA

Selecting this option lets you retrieve data that has been logged during a data-logging session with the micro:bit.  This is only available with Version 2 micro:bits.

iOS App – Summary of changes in August 2023 update : Help & Support

micro:bit code printout

The Village of Banton, where I teach, celebrates Halloween on the Friday before the 31. Which is nice ’cause you can have a Friday party. We had one yesterday afternoon, in the morning we did some halloween related work.

When I sat down at my desk yesterday morning I had a quick look at twitter. I’d been in a conversation over breakfast. I ended up having a quick scroll through Mr Morrison‘s timeline. I saw a couple of interesting micro:bits things:

https://twitter.com/SSERCDigital/status/1585251905428918272

and

The first was to blow away a ghost. I couldn’t see instructions, but presumed it would be simple enough to figure out. The second was really simple, but linked to a blog post which had a nice wee pumpkin cardboard template that fitted a micro:bit.

Pumkin Ghost

My class have done a varying amount of coding, so I though we could do this as a stepped challenge. The more experienced could help the other out.

I printed off the templates and cut out the holes for the micro:bit buttons. I’ve found that making a neat job of these is difficult, but helps keep the cardboard on the micro:bit. Quite glad I’ve got a small class.

I then worked out and made the code to, add a face to the pumpkin with button A and a ghost with button B. Blowing on the micro:bit would blow (animate) the ghost off the screen.

I made a quick slide with the challenge and pictures of a few useful blocks.

Microbit Halloween Challenge: 1. Show a ghost for pumpkin on button a 2. Show a face on button b 3. Animate face 4. make ghost go away when you blow 5. make ghost only go when it is already on screen 6. play a sound when ghost flies off

We started the lesson by being really quiet and watching me demo. The class is 1-2-1 iPads and we use the micro:bit editor, we have enough micro:bits for one each too.

My though was that the least experienced could manage 1, 2 & 3. I hoped the images of the blocks would remind the others of enough to get them started on the harder ones.

Most of the class managed the first couple of tasks straightaway. To my surprise quite a few asked to skip the third. The vanishing ghost was too tempting.

The next step, to animate the ghost away on a sound was managed by quite a few of the class. The tricky part was only showing the animation if the ghost was on the screen. A few, having seen the clues on the slide, created variables to test for at the start of sound block. We did need to stop a few times to figure out when and where to toggle the variable and how to test for it in the right place. Lots of useful mistakes were made.

By this point a few children had managed to solve the complete problem, adding some sounds to their animation. They could then help, (without using their fingers), their peers. A couple of the class didn’t manage to get the whole thing done, not getting a full understanding, but they all managed at least some of the challenge.

Given the class have done at least a couple of recent micro:bit lessons covering inputs and decisions the challenge approach worked well. Some had used code that was not particularly efficient. Some strange and unnecessary repeats. I am not really sure my own approach to the code was the best.

As everyone put the finishing touches, cutting out pumpkins and tweaking code I though we could finish with a quick demo of the radio feature. For this bit I did just put the code up on the board.

One child, remembering radio code from previous years volunteered to make the controller. We finished by testing and recording the radio controller, setting all the micro:bits to show a ghost via the controller and getting all the ghosts to fly off by shouting boo!

A few interesting points emerged

  • This idea came to me though some tweets at around 8:00am I had to through some resources together before 9, scrap (recycle) some of the morning plans. The final section, using the radios, just came to me while teaching and extended the process by half an hour. I am sure this says something about my professionalism & planning.
  • Working through the logic is hard. The children with more experience are beginning to be able to debug sometimes. Noticing typos (or bad values for variables, blocks avoid a lot of these problems) you have made or miss-ordering or putting blocks in slightly the wrong place is easy. I was listening to a WordPress lesson driving into work on Friday and noticed that the tutor, presumably prepped and a confident coder, still made mistakes like these.
  • Somethings just didn’t work. Adding sound work if we used the play sound block with pre add sounds. Using the melody block or the block that plays sounds you write yourself tended to cause problems. All the code would stop working after a while. I am not sure if it is a bug or problem with the micro:bits or we just don’t know something.
  • A couple of pupils had exactly the correct radio code but it just did not work exactly as expected. The code used an if else block to switch depending on if it received a 1 or something else. The micro:bits just executed the first choice every time. The pupils and their pals couldn’t see any problem with the code and neither could I.
  • Most of the class wanted to get to the more dramatic bit of code quickly and asked to skip the simple animation of the face. Quite a few wanted to work in the code editor without testing their code until they got to the end. I was quite happy with the skipping bits but I did ask them to do quick tests as they went along.
  • One pupil who had got into a bit a mixup with the code had made a nice change to the animation, the ghost going off the screen at an angle rather than straight up.

The micro:bit editor has a nice print feature, I used it to make the featured image for this post.

Bookmarked Data logging with the BBC micro:bit (microbit.org)
You can use the BBC micro:bit V2 with built-in speaker as a data logger, recording data from its built-in sensors. Data is stored on your micro:bit even when its power source is disconnected.

This looks really interesting. H.T. to @LouiseE_Foreman. The way the data is saved and accessible is very clever.

You can log data from any of the micro:bit inputs; light sensor, temperature sensor, pins, accelerometer, compass, microphone

 

Over the last few years I’ve had quite a bit of fun with micro:bits. Given I’ve been using the same ones all that time they were pretty good value. It is great to see them getting a bit more traction in Scottish schools.

We are to get some more free ones: Scottish schools to receive 20 micro:bits. This will be great. I’ve got access to plenty but the new ones have some nice new features. Built-in microphone, speaker, capacitive touch sensor, and power save button. The speaker will be particularly welcome, avoiding a bit of footering . The power button too as I’ve found that detaching the battery is quite tricky for small fingers. I hope they arrive soon.

There are also a lot more support events & materials for classes appearing.

19 May 11 – 11:45 Code Along with micro:bit – Relaxation & Mindful Breathing looks fun, but clashes with our sports day. My class did participate in a couple of similar scratch events via Teams. Although these were not anything I could not have covered myself. I did find the pupils were extra engaged with a virtual teacher and peers.

You don’t even need micro:bits to take part,

Micro:bit not required as you can still take part using the MakeCode simulator.

Which until this week I would have though was missing the point. The other day I was re-introducing some of my class to micro:bits. They had made simple rock, paper, scissors shakers. We were discussing the problem of knowing, for sure, if the shake had worked. Two similar results could be due to random selection or by nothing happening. While the pupils were playing with solutions to this one explained he was not going to flash the micro:bit every time. He preferred the simulator! This surprised me, as I think the device is a big draw for most pupils.

The other week New support for teachers launched today | micro:bit. I’ve already found the examples and projects on makecode.microbit.org very useful. I am looking forward to getting to try the ones for the new micro:bits.

In class we have been using the iOS micro:bit app rather than the web. This solves the issue of flashing the micro:bits via usb by using Bluetooth and works really well. We did a bit of work on our arcade devices this session. That meant pupils using the web downloading hex files on their iPads, air dropping to a MacBook and then transferring to the devices. Bluetooth avoids the “one MacBook” bottleneck.

The other bit of micro:bit information I have is that Glow Blogs now supports the embedding of the micro:bit simulator. This enables pupils to share their creations and keep a record of their achievements. I’ve just updated the microbit instructions for Glow Blogs. I hope to see some examples in the wild soon.

Bookmarked Making & Moving with Micro:bit & Scratch (docs.google.com)

Making & Moving with Micro:bit & Scratch

A google doc:

The Scratch Team will show you how to get up and running with micro:bit and Scratch. We’ll demo a variety of projects that connect Scratch to the physical world using micro:bit. The session will end with sharing resources that support making and moving with micro:bit and Scratch!