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.

Feedland went public today. I’ve been lucky enough to have been testing it and following its development for the last few weeks.

Feedland is a lot of things, all to do with RSS feeds. First it is a place to gather and organise feeds. Second it can be a place to read these feeds. Third it allows you to publish a ‘news product’ which you can share so that others can read the news from sets of these gathered feeds. Fourthly it is a place were you can see what feeds other users have gathered.

Feedland was built by Dave Winer who

pioneered the development of weblogs, syndication (RSS), podcasting, outlining, and web content management software;
So it has an interesting pedigree and is opinionated software. Dave has had as long a relationship with RSS and OPML as anyone on the web and in an excellent position to have opinions.

Feedland is developed with an eye to interop. Feeds to get information out abound. For example the widget on my sidebar uses the Sync OPML to Blogroll plugin to sync my blog role from the opml list of feeds I’ve subscribed to in Feedland. I could also use this to control the feeds I view in an rss reader like inoreader which supports external opml.

Dave says:

FeedLand is all about people, feeds and news.

One of the most attractive, to me features, is the possibility of communities being loosely organised around the sharing of feeds. It is easy to see the feeds another user has gathered and to add them to your own list with a handy checkbox.

Feedland is still developing. I’d recommend a look at the docs and there are some interesting views starting to appear for the early adopters.

I’ve only touched on a few to the things about Feedland I’ve found interesting so far. There is a lot more to this app already and lots more to come.

hypercard icon

Yesterday I was posting a note about a book and though of a slight visual joke. I needed a bit of css animation added and it seems a bit too much to either have it in the customiser or my child theme. It turns out there is a block for that: Blocks CSS: CSS Editor for Gutenberg Blocks.

This plugin just added a field to the more settings area for the block where you can add some css, I’ve used it on the image of the HyperCard icon about to animate it.

I am still not all in on using blocks, but this could be fun.

Of all the digital tools I’ve used the one that has stuck with me longest is RSS. I’ve been excited & delighted to get a peek at Feedland. Feedland is Dave Winer’s latest foray into the technologies he has spent many years working on, RSS, opml & news.

As part of my peeking I’ve had the chance to produce a personal news reader. Any messiness is down to me rather than Feedland.

Over the years I’ve made a few similar things. This has been one of the easiest ways. The linked page is running on an old Raspberry Pi 2. Most of the work is done on Dave’s servers but the end result was easily produced on my own.

Dave hints this is a partial sneak peek. I am looking forward to exploring and finding out more.

I saw a tweet from  James Abela:

Just found this amazing tool to convert any @scratch project into a #Mac #App. You can now literally use this kid’s tool to put apps together! Incredible and I managed this in less than a minute! #everyonecancode #scratch #appinamin #coding How to make a Scratch Project into a Mac OS app in under 1 minute – YouTube

The TurboWarp Packager Converts Scratch projects into HTML files, zip archives, or executable programs for Windows, macOS, and Linux. but it is linked to several tools that are part of TurboWarp:

TurboWarp is a Scratch mod that compiles projects to JavaScript to make them run really fast.

Now the sort of thing I do with scratch is certainly not in need of speeding up or turned into an application! But I have seen many really complicated scratch programs, but my needs are simple.

I did recall a maths project we made in class a couple of years ago, when working on probability & chance. The project throws dices a number of times. Of course the class wanted to run it many many times, but it got a bit slow once we got to 10 million throws.

Here is the Project on Scratch:

And in Turbowarp:

For me 100 million throws took 1056.443 seconds in Scratch and 21.784 seconds in Turbowarp. I guess device, browser, operating system and the direction of the wind might change these results a bit. I also expect the code could be a lot better;-)

I’ve just read On Reshaping: Tooling WordPress with nothing other than it’s URLs – CogDogBlog

Alan covers many of the interesting url patterns that can produce sets of posts in WordPress. I knew of some, but there are several gems I’d not discovered. Combining dates and taxonomies for example. RSS Feeds for all of these and finally RSS feeds for searches.

Many of these could all be used as links on your site in the same ways as a simple category can be added to a menu. It reminds me of one of my favourite plugins Display Posts which lists posts filtered in every which way. 

The RSS ones might be used to show a dynamic set of links from a different WordPress site. For example Alan mentions HyperCard in his post, by using the url for the RSS feed for a search on his site for HyperCard I can use the RSS block to show search results for HyperCard on Alan’s site:

I don’t usually use the block editor on this site. To insert the RSS block I switched to the block editor, inserted the block and switched back.

This is a bit kludgy but apart from some bother with paragraphs it seems to work.  Once you have added the block and switch back to the classic editor the block is invisible in the Visual view but you see:

<!-- wp:rss {"feedURL":"https://cogdogblog.com/?s=Hypercard\u0026feed=rss2"} /--> in the text editor. You could just save the snippet, and change the url for later use. (Or just use the block editor it seems to be the future).

See also Hidden in the Code – Read Write Respond found via a search for a possilbe featured image

I occasionally use Word Cloud generators for school use, for example a header on a blog post. Each time I just search and try a couple until I find one that is free, doesn’t need a sign-up and does what I want.

I’ve also occasionally used iPad apps, but never found one I like enough to remember.

This week I needed one again but given I has 30 minutes free I searched for commandline wordclouds instead. This took me to amueller/word_cloud: A little word cloud generator in Python.

A bit of copy pasting in the terminal got this installed. I can now make lists of words in a text file and quickly create a word cloud with something like this:

wordcloud_cli --text spelling-list-1.txt --imagefile spelling-list-1.png --width 800 --height 400 --colormap tab20

It only take a few seconds. I could batch process a pile of lists all at once.

The app has a lot of features, colour schemes, size variations, fonts and the like and is beautifully documented: Command Line Interface — wordcloud 1.8.1 documentation.

The featured image uses text from Get Drunk! a handy test text.

wordcloud_cli --text get\ drunk.txt --imagefile getdrunk-3.png --width 800 --height 400 --colormap tab20 --fontfile /Library/Fonts/GiddyupStd.otf

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.

File box old HyperCard iconEver since I updated my home Mac to Monterey, OneDrive has been a bit flaky. I updated the app and it has been syncing. But I could not open the app itself or click on it in the menu bar. Attempting to do so grave me a beach ball of doom. Restarting, etc had no effect.

To day my Mac at work, an older iMac with an older system presented me with the message, “The application “OneDrive.app” is not open anymore”. This persisted through a couple of force quotes, resetting OneDrive and restarting. Eventually installing a new version from the App Store and resetting allowed me to set it up again. The syncing has changed so that by default items are kept in the cloud and downloaded on the fly.

On getting home I decided to try and sort out my home Mac too. This was already running the most recent version. Resetting, rebooting several times did not work. Finally I deleted the app using CleanMyMac, to get rid of any stray bits, and reinstalled from the App Store. This then let me go through the setup process again, logging on, enabling extensions, choosing the same folder and all the rest.

I’ve set my mail school work folder to be always downloaded and left the rest in the cloud, I’ll see how this works.

The reset process seems pretty bonkers for a modern application. Opening the application package, navigating to a folder and running a command file!

Hopefully I’ve now got OneDrive sorted for a while, an maybe these notes will help someone else. I do find OneDrive an important time saving device that lets me work from home fairly seamlessly, when it works. I am lucky in that I’ve got a Mac at work, though I worry about it lasting to my retirement.