Pimoroni Mood lamp

I bought the Pimoroni Mood Lamp kit way back in March at the Raspberry Pi Birthday Party, but I held off building it until Louise could come around, especially as I was nervous about soldering all of those pins onto the Pi Zero so I thought it would be a nice project for us to do together. You may remember that last year Louise and I built the CamJam 3 robot kit together; she is a talented artist and pub landlady with absolutely no background in computer science and no knowledge about how any of this stuff works, so she’s a great person to try things out with.

Screen Shot 2017-05-19 at 23.04.26.png

So for those of you who aren’t familiar with the Pi Zero, it’s an even more tiny and cheap Raspberry Pi and it doesn’t come with GPIO pins already in place so you have to solder them on if you want to use them. Scary stuff for a novice solderer like me! In February, in time for the 5th birthday, Raspberry Pi announced the Pi Zero W which adds Bluetooth and WiFi to an already tiny and affordable device. The Mood Lamp was one of three kits that were released by Pimoroni at the launch of the Zero W. You can also get your hand on Pirate Radio, Scroll Bot and, as of a couple of weeks ago, the OctoCam – find them here.

So… on to the soldering. We started off watching the new soldering video which the Raspberry Pi Foundation brought out recently starring the lovely Laura Sach. I found Laura’s video to be really useful and interesting, but we also listened to the advice of soldering guru Stuart. As he pointed out to us, he’s been setting fire to carpets since he was 9 years old and so is experienced at soldering.

I had prepared for disaster and got a spare Pi Zero W and a hammer header in case the soldering went horribly wrong – thank you to both ModMyPi and Pimoroni for donating the spares (not that the former had much choice, they foolishly didn’t believe me when I said that the circumference of a pint glass was longer than it’s height and agreed to give me a Pi Zero W if I proved them wrong)… but I digress. The hammer header allows you to add pins to the Pi Zero W by tapping them in place using a hammer, so an excellent option as a back-up plan.

Stuart decided to solder five pins to start us off and hold it in place and then left us to it. He explained that it was important to make sure that we were heating the pin and the Zero and applying the solder to that and not the soldering iron. We had a go at a few pins, but Stuart wasn’t happy and told me to make sure I wasn’t just dabbing solder on the iron and letting in roll down. By the time the pair of us finished, we were pretty happy, but Stuart took a careful look and said that some of our joins didn’t have enough solder and so weren’t properly connected… and to think I was worried that I’d put too much solder on some of them. All told, we were there for around fifteen minutes, but it felt like much longer.

We were pretty pleased with ourselves when we’d finished so we sat down and got the kit out to try and figure out all of the parts… We had a bit of fun peeling off the plastic from the acrylic and laid all the bits out, but then we realised that we had still more soldering to do – the Unicorn Phat needed soldering too!!

Back to the kitchen we went, Louise decided to leave me to it and apparently I hit my soldering mojo and got the entire header soldered in a few minutes!

So, all soldered up, we were ready to go – I was quite interested to see the difference between the soldering on the zero compared to on the Unicorn Phat – I’d clearly improved by the second time!

IMG_1452

IMG_1455

Louise was confused by the how the pieces went together, but we quickly found the tutorial and before we knew it, it was all built and looking pretty, including our soldered Pi Zero W and Unicorn Phat header.

Thank goodness for Stuart’s ridiculous amount of tools, as we were able to clip off the excess bolt length on the Pi Zero W mount.

IMG_1459.JPG

So, now we’d built our Mood Lamp, it was time to run the code – I put a Raspbian SD card into my pi-top, transferred the Unicorn pHat to test it. We followed the instructions on the Pimoroni GitHub for the Unicorn pHat to download and install the relevant library and examples. I figured random_sparkles.py was probably a good place to start, but when I ran it through Python 3, nothing happened. Stuart to the rescue… he opened Terminal and used the command

cd /home/pi/Pimoroni/unicornhat/examples

To access the directory and then used

sudo  ./random_sparkles.py

to get the code running – this frustrated me a little bit as I wouldn’t really have known to do that without his help. I know to run code through Idle, but I wouldn’t think to use Terminal and sudo without him telling me to – especially ./ which I’ve never seen before.

Next step was to get the code to run on start up – again I had a few problems with that, I followed this great guide from Les Pounder, but managed to accidentally leave the last line of the code as a comment with a # at the beginning – a little frustrating, but entirely my fault. We also discovered that again we need to use ‘sudo’ to get the code to run on start up, this time within the crontab settings (whatever that might mean).

So, we got the random sparkles up and running on start up and decided to transfer the SD card and Unicorn pHat into the Pi Zero W and get the mood lamp up and running. Unfortunately, we had no luck and I began to worry that I’d soldered everything wrong. Stuart sat and used VNC to check the pi was working and as far as we could see, everything was running as it should, but no random sparkles. Stuart decided to pull the Pi Zero out completely to check nothing had come loose and this point he threw his hands in disgust and gave it to me… it seems when I’d put the pHat back on the Pi, I’d not mounted it in the right place, it was just on the front row of pins and not on all 40 pins! What a wally!

I have to admit to finding this a little more stressful than I’d hoped, especially with the whole ‘sudo’ thing, and I have absolutely no idea where to start with connecting it to Twitter, but I’m glad I’ve got it built and it does look kind of cool. I think I’d like to use one of the other samples as the random_sparkles was a bit too quick for my liking, but that means going back into Crontab and putting all the bits back into the pi-top and I’m not sure I have the energy for that right now!

So, it’s an easy to put together kit, I just don’t feel like I’m quite confident enough with running code on start up or what to do when things don’t work first time!

At least Louise and I can both say that we know how to solder now, anyway!

An Easter gift – RPi beginner’s worksheet

[edit] As of June 2017, there is a version of Scratch 2.0 on Raspbian which makes this worksheet obsolete [/edit]

I’ve been running a few workshops for Crossover Solutions and have created some Raspberry Pi Physical Computing resources that seem to go down well with both children and adults and so, as a little Easter gift to you all, I’ve decided to share the worksheets.

There are four in total – ‘Your First Circuit’ ‘Scratch’ ‘Python’  and ‘Next Steps’, all designed to be an introduction to physical computing. My experience has been that pupils will get three LEDs blinking in Python within an hour – I’m sure you could do it quicker, but it’s really important to discuss with the pupils what they’re doing at each stage and why so I tend to take my time to ensure that conversation happens, particularly since this can be used as a transition from Scratch to Python as well as an introduction to electronics.

As always, huge thanks to the Raspberry Pi Foundation for the inspiration to produce resources like this, as well as their never ending support.

Get in touch if you’d prefer an editable version and I will send it over to you, otherwise click on the link below for a pdf.Screen Shot 2017-04-16 at 11.22.24.png

link: Workshop – crossover

Creative Commons Licence
Crossover Workshop by Cat Lamin is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

Trying out the Micro:bit

It’s taken me far too long, but I’ve finally got my hands on a Micro:bit! I often get asked about these little micro-controllers and whether they are useful to have in the classroom so I’m looking forward to testing them out. Thank you very much to Nic Hughes for the loan!

The first thing to say about the Micro:bit is that unlike a Raspberry Pi, it’s not a computer; it’s a micro-controller like an Arduino, which needs to be plugged into a computer to have code uploaded to it. In contrast, a Raspberry Pi is a computer which does not need to be connected to anything else to work. This means that the Micro:bit is slightly more limited than a Pi, but it’s still a cool device.

So, let’s take a look at the physical hardware. The Micro:bit has a number of exciting features, not least of which are a host of components, which are clearly labelled on the back of the device – in particular, a compass, accelerometer and BLE antenna. I really like how clearly everything is labelled on the back for the device, this can be a great teaching point – what do we think each of those things do? How can we integrate them into our code?

The front of the device has 25 red LEDs in a 5×5 array. There are also two programmable buttons, 3 hardware pins, a 3V pin and a ground pin which can be used for add ons like NeoPixels or a growing range of Micro:bit boards designed to fit onto the Micro:bit like HATs on a Raspberry Pi.

In order to use the Micro:bit, you’ll need to head to the Micro:bit website. I suspect that there is an offline version of the various code editors, but for now I’ll work on the assumption that I need to work online. I know you can download Mu (pronounced moo because the creators liked the idea of ‘teachers saying moo in class’), which is a micro-python code editor for the Micro:bit, but I’m not sure about the other code editors.

Given my primary background, I will focus on block-based coding for now, but I can always follow up with a look at micro-python in a few days.

I love that there seems to be a wealth of activities on the website, including a special ‘Mother’s Day Challenge’ (For Americans and other non-UK people, Mother’s day in the UK falls in the middle of lent, which is usually in March, rather than mid-May).

Screen Shot 2017-03-07 at 09.50.58.png

For now, I’m going to be looking at the ‘Let’s Code’ section of the website.

Screen Shot 2017-03-07 at 09.54.00.png

When I first looked at the site a few weeks ago, the JavaScript Blocks editor was still in Beta, but Nic was very firm that we should be using it over the previous blocks editor made by Microsoft. I’ve also seen a tweet today showing that python-blocks is in development, although still only in Alpha at the moment. I can’t wait to see what it looks like!

Screen Shot 2017-03-07 at 09.58.43.png

It’s worth taking a look at the projects page for some ideas about where to start with the Micro:bit and there are a few teachers coming up with schemes of work that use it (I suggest getting in touch with Spencer Organ who has written an entire scheme of work around Harry Potter).

Screen Shot 2017-03-07 at 10.00.44

Since I’ve had so much fun making animated pets on the Pi lately, I figured an obvious start point for me would be to do something similar on the Micro:bit. Interestingly, when I went into the code window, it had remembered the piece of work I did several weeks ago when Nic first showed me the Micro:bit, which saved me having to hunt around and figure out the code!

So here’s how the screen looks – it has a nice familiar feel to it since it’s based on Blockly and is therefore very much like Scratch. The blocks are nicely colour coded depending on what you want them to do. I’m particularly curious about the ‘radio’ and ‘music’ options – I think you can allow Micro:bits to talk to each other, but I could be wrong – definitely something I’d like to investigate further.

Screen Shot 2017-03-07 at 10.06.50.png

Here’s a closer look at the code I’ve written – the ‘pet’ was a little harder to draw on 25 pixels so it looks a bit weird.

Screen Shot 2017-03-07 at 10.06.44.png

One frustrating thing about the Micro:bit is that you need to download the code and then manually drag and drop it into the Micro:bit although I’m told on a PC you can set the download location directly to the Micro:bit, still it’s a bit of a faff.

Screen Shot 2017-03-07 at 10.07.14.png

A really cool feature of the Micro:bit website is that you can test your code on the website – in the video below you can see that you can test the ‘shake’ feature both by clicking on the shake button or by manually ‘wiggling’ the device. I think it’s really important that we remind children to check their code regularly as it can be really hard to find an error in your code if you’ve written loads and not checked it.

In the second video, you can see the code running on the actual Micro:bit.

There seem to be lots of input options to use instead of ‘on shake’ and I’d be interested in giving them a go, although I’m not sure what they mean. There are also other options to drag in. Take a look below:

Another nice little feature of the blocks editor is that you can view your code in JavaScript. I look forward to this being possible for Python too, which looks like it’s in development based on Nicholas’ tweet mentioned above.

There are a few ‘advanced’ options I’d be keen to explore, as well as the ability to add in packages for add ons which seems intriguing. Hopefully I’ll have a chance to explore some more features soon.

So, what do I actually think about the Micro:bit?

I’m actually more impressed than I thought I would be, I was expecting to be underwhelmed and instead I had great fun playing with the Micro:bit. The website is fairly easy to use and has some lovely features. I look forward to seeing it develop further. I know there are teachers crying out for schemes of work relating to Micro:bit so perhaps that’s something that needs developing further and in my brief hunt around the site I didn’t see any obvious explanation of some of those features in the code editor, but I admit I wasn’t looking too hard.

If I had my way, I’d like to see teachers using Micro:bit with a Raspberry Pi to really emphasise the technology and make clear how unique and exciting digital making can be – check out this resource on using the Micro:bit with Pi. However, if you forced me to choose between Micro:bit and Pi, Pi would win every time, it’s just more versatile and has more opportunity to develop your skills.

Micro:bit is a great place to start on a journey towards digital making and at £12.50 (or £15 if you want a battery pack with it), it’s fairly affordable, but it is simply a start point and you can achieve so much more with Arduino and Pi – for schools it is a good way to introduce text-based languages and I am particularly looking forward to the new block-Python that is being developed. In the long term, however, I know what I’d rather see being used.

 

 

A busy few months

I know you guys love hearing about what I’m up to so here are a few fantastic events that I’ll be appearing it either running workshops or giving talks – it’d be great if you could come along and join in the fun!

Firstly, this weekend I’m taking the pi-top Champions to The National Museum of Computing and Bletchley Park museum for a weekend of training and fun – the most exciting thing about it is that on Sunday 19th the Champions will be running workshops in the National Museum of Computing, showing off exactly why we chose them – I’m so excited about this weekend and hope some of you can join and bring your kids along to what will be an incredible day of opportunities. Let us know you’re coming by signing up here!

tnmoc-logo_3

I’m really excited about the Champions day as I feel like we’re bringing together some of the best of the best when it comes to running workshops, training and all things Raspberry Pi – we’ve picked an amazing team of people for our Champions and I can’t wait to share further details with you all!

I’m looking forward to joining Nic Hughes at the London CAS conference on Saturday 25th February. Nic and I are working together with him leading a Crumble workshop and me leading a Physical Computing Raspberry Pi workshop. It’s always good fun working with Nic and we’re looking forward to inspiring some teachers to innovate their computer science classrooms.

Raspberry Pi is celebrating it’s 5th year at the Junction in Cambridge on 4th and 5th of March and I’ll be there both days and doing a talk on the importance of teaching children to code on Saturday 4th at 1.30. The birthday party is always a great fun community event and tickets can be bought here.

Throughout March and April, I’m running workshops through pi-top for a number of great charitable groups such as STEMSussex, BECSLink and London CLC which will be great fun and I’m hoping to be able to do something for International Women’s Day on 8th March.

</edit> I forgot to mention my own event – Coding Evening for Teachers, in Twickenham on Friday 24th March – tickets are here.</edit>

At the end of March, I’m VERY excited to be attending three incredible events – first up, the NAACE conference in Leicester (28th-29th March), where I’m running not one, but TWO break out sessions – one for pi-top and one talking about the amazing Active Lit as a tool for writing text adventures. Looking at the speaker list, I have a feeling this is going to be a very exciting event and it seems that the people at NAACE are really determined to make it a very successful couple of days.

Next up is PiWars in Cambridge – I’ve always been a big fan of Mike Horne and Tim Richardson, especially their really helpful CamJam EduKits for teaching physical computing with Raspberry Pi so I was incredibly honoured to be asked by them to be a judge at PiWars, an event so popular it’s had to extend to cover two days instead of just one! The blurb for the event describes it as:

logo-v2-rgb-sm

Pi Wars is a challenge-based robotics competition in which Raspberry Pi-controlled robots are created by teams and then compete in various non-destructive challenges to earn points. There are prizes awarded at the end of the day. Last year, we had teams from schools, families and groups of hobbyists and 30 of these teams competed for a full day of robot fun and games! Pi Wars takes place in Cambridge, UK and is open to anyone from around the world. It is run by the same team that organises the Cambridge Raspberry Jam.

How much fun does that sound? There are still spectator tickets available if you want to bring your children or even your class up to inspire them to create their own robots and one of the two days is dedicated entirely to schools and youth groups!

Following on the heels of PiWars is ATI 2017 in Malvern. Primarily an Apple event, this year ATI has extended to include some more general computer science skills, particularly Raspberry Pi and the lovely Joe Moretti asked me to suggest some workshops. I feel like a bit of an interloper seeing my name surrounded by some of the big names in Apple Education, but I’m really excited about offering some Physical computing and Minecraft hacking information for some teachers, most of whom will be completely new to Raspberry Pi and then entire Pi ecosystem. ATI looks like n exciting event and I know that the other presenters are all incredibly inspiring so I’m really glad to be part of the team – there are still tickets available and it’s worth going along just to meet people like Joe, Mark Anderson, Catherine Jessey and Jon Neale, all of whom I’ve seen present before and know are incredibly inspiring!

c4n_svmwaaa5kgf-jpg_large
Photo credit – Mark Anderson @ICTEvangelist/ATI event page

You’d think that’d be enough events, but no… in May, I’ve been invited by the STEM Centre in York to run a ‘Scratch Roadshow‘ taking sessions to Truro, Bristol, Swindon and Reading. This will be an intro to Scratch for primary school teachers who want to build their confidence a little – the best thing about it is that there is a bursary which makes the training completely free so it’s well worth letting your local primary school know if you think they could do with a boost!

Anyway, there are more events later in the year, but that will do for now! I hope you can come along to some of these events and please do come over and say hi – I love meeting you all ‘IRL’. And remember – if you can’t come to any of these events but are still interested in the type of training I can do, please drop me an email cat@crossover.solutions – I offer workshops and CPD training bespoke to your school or group’s needs!

 

Shakey Sense Hat Cat

[edit] As of June 2017, there is a version of Scratch 2.0 on Raspbian which makes this worksheet obsolete [/edit]

After Sunday’s coding session, I set the boys the task of making our Scratch Sense Hat Cat Shake, just like Carrie Anne’s Interactive Pixel Pet.

The first thing the boys did was to figure out how to use some of the sensors on the SenseHat – remember how in my other post, I said it was good practice to run the basic broadcast command before you do anything.

screen-shot-2017-02-12-at-19-33-46

We had found some code from Albert’s GitHub page, however, when we tried to select the sensor value for accelerometer, we only had a few choices as shown below.

screen-shot-2017-02-14-at-12-40-30

screen-shot-2017-02-14-at-12-35-53

Luckily, after trying a few things, I suggested that we hit the green flag to check that the GPIO pins were on and that Scratch knew we had a SenseHat attached. When we next checked the sensing options a while heap of new options appeared, including the accelerometer (sorry, I forgot to screenshot it).

The boys had great fun playing with the sensors, but couldn’t quite figure out how to get the ‘shake’ function working so they went back to the original code for Interactive Pixel Pet.

x, y, z = sense.get_accelerometer_raw().values()

while x<2 and y<2 and z<2:      
    x, y, z = sense.get_accelerometer_raw().values()

This is what they come up with:

screen-shot-2017-02-14-at-12-49-01

A job well done, if I do say so!

Now, I’m sure some of you have spotted that I could neaten up my code by removing the ‘ledbackground’ line and that ‘clearleds’ would be better suited to the end of the repeat loop as that would leave me with a completely blank neopixel array at the end of the animation sequence, but otherwise I’m pleased with our work in recreating the pixel pet for Scratch.

I look forward to trying out some of the other sensors using Scratch in the future!

 

Sense Hat Cat using Scratch

[edit] As of June 2017, there is a version of Scratch 2.0 on Raspbian which makes this worksheet obsolete [/edit]

So, I absolutely LOVE the Interactive Pixel Pet activity from the Raspberry Pi website, and while I was playing with the Sense Hat the other day, I realised it was possible to imitate it using Scratch. So far I’ve only got it running as an animation, so next step is to get the shake function working as we’ve just figured out how easy it is to use the other sensors on the hat using Scratch.

I had a play and managed to get a very cool dancing cat on my LED matrix – I’m not going to lie, I was super excited and may have run around showing everyone in a slightly excited manner. Fortunately, my colleagues were also excited, although their contributions of dancing ‘poo emojis’ weren’t quite what I had in mind.

screen-shot-2017-02-12-at-19-33-04

Here’s a bit of background on the Sense Hat… for those of you who don’t already know, the Sense Hat was created by the Raspberry Pi Foundation and launched as Astro Pi – a competition to get your pupils’ code into space. It has an 8×8 neopixel array, a mini joystick and a load of amazing sensors like humidity, pressure, gyroscope and accelerometer.

So, the first thing you always need to remember when using Scratch GPIO is that you have to turn on the GPIO server on and, if you’re using a hat, you’ll need to let it know which hat it is by using the command “set AddOn to”.

screen-shot-2017-02-12-at-19-33-46

This is pretty important for anything using the SenseHat and it’s good practice to run it before you go any further in your code as by running it, Scratch will realise you have access to all of the sensors on the hat and allow you to access them through the drop down menu in the blue ‘sensor value’ block.

Firstly you will need to delete the Scratch Cat so that you can draw you own sprite.

screen-shot-2017-02-12-at-19-34-06

In the paint editor, you need to zoom right in as far as you can and select the smallest brush size.

screen-shot-2017-02-12-at-19-34-36

You have four squares in total to draw your image – I’ve shown this here by making the area black (you don’t need to do this, but it can help as ‘black’ represents the neopixel being turned off).

screen-shot-2017-02-12-at-19-35-16

Now you can draw your image – you have exactly 64 pixels to draw with and, as you may have guessed, one pixel on the screen represents one neopixel on the sense hat. By the way, a neopixel is a very bright LED which can be any colour depending on the mix of red green and blue. The lighter your colour, the brighter it will appear on your neopixels so try to avoid dark browns and blues etc.

screen-shot-2017-02-12-at-19-35-42

Next you need to create a second image – you need to use the duplicate command to create a second version of your image.

screen-shot-2017-02-12-at-19-36-05

Then click on the costumes tab to be able to edit it a little bit so that you can make your second sprite slightly different, thus giving the appearance of animation.

screen-shot-2017-02-12-at-20-04-20

Finally, you need some simple Scratch code to get your image moving – I’ve put a couple of broadcast commands in here to clear the SenseHat before you start and to make sure that the background is black (so turned off).

screen-shot-2017-02-12-at-19-36-38

You can experiment if you want by changing the background colour, although this will only make a difference if your sprite is ‘backgroundless’ (but you have to make sure it’s still only 8 pixels/2 squares wide).

screen-shot-2017-02-12-at-20-11-12

I’ve had great fun recreating this project in Scratch and I’ve set Stuart and Kirk on a mission to figure out the ‘shake’ control too so hopefully I can add an update soon.

<edit> Kirk and Stuart have successfully managed to get shake working and are now celebrating with chocolate cake

img_0908

</edit>

Part two of this project can be found here.

All thanks to Albert Hickey for his advice with this project – he is a Scratch and SenseHat guru!!

Watch this space for some more projects using Scratch soon!

Etcher -the BEST tool ever for burning OS to SD cards

A couple of years ago, I wrote a post about burning SD cards on a mac… but I’m not gonna lie, I found it quite difficult to do. You can imagine my delight, when someone at work suggested I try Etcher near the end of last year. What a fantastic app for making burning SDcards easy!

Just a reminder – when you’re using a Raspberry Pi, you need to install an operating system on your microSD card. Most Pi users install Raspbian, however, I’ve been using pi-topOS a lot for work. Installing an OS usually requires wiping the SD card manually then using clumsy software or even accessing the command line to install the new OS. Whereas with Etcher, you get clear feedback on process in a very easy, visual way.

Etcher is available for Windows, Mac and Linux, it is free to download and easy to install.

Screen Shot 2017-01-31 at 14.57.50.png

On my old MBA I had a lovely SD card slot so it was REALLY simple for me to use – literally I downloaded the latest version of Raspbian or pi-topOS, put the SD card in, select the downloaded file (no need to extract the file, just use it as is), select the SD card and Flash!

Check out this gif from the Etcher website – it really is that simple!

product.gif

So… one peril I found was in my own stupidity.. I nearly flashed my USB stick instead of the SD card, only noticing at the last minute that the drive I’d selected was too big to be an 8GB SD card…

I’m sure you can turn it off, but Etcher automatically verifies the SD cards its burning, which does double the time it takes the burn an image. However, I found it used very little processor power and I quite often had SD cards burning in the background while I got on with my other work, which meant that by the end of the day I’d burnt a fair few SD cards to be workshop ready (I’m OCD, I like things to be prepared).

Seriously, I can’t fault Etcher, it has a fantastic interface, it’s easy to use, you don’t need to pre-wipe the SD cards, you just pop them in a burn away – so, so easy!

Good luck and enjoy!! Now… how do I burn SD cards on my new MBP??

 

A Strange Experience – Being on the Other Side

Since I’ve been working for pi-top, I’ve experienced being on the other side of the EdTech system and it’s certainly been a bit of an eye-opener

I’ve tested various products over the years and found problems and complaints, bugs and surprises, delights and nightmares, but it has been a really interesting experience for me being a producer of content rather than just a consumer.

Firstly, I thought it would be really easy to implement all of the things on my ‘want’ list – it turns out that it’s nowhere near as easy to just ‘add a button that prints out all of the users’ or ‘add a widget that allows the teacher to find out the answer’. All of these things require thought, tweaking of the UI (user interface) and lots of code.

I’ve learnt that things that seem obvious to me are not necessarily useful or even acknowledged by other users.

I’ve learnt that a developer can spend two weeks working overtime to completely overhaul the interface and I’ve not even noticed a difference (sorry).

I’ve discovered that it’s really important to make it clear what the delete button does… and I definitely didn’t accidentally delete a huge chunk of a resource which, thankfully, had been backed up.

I’ve found out that it’s really, really important to get more than one opinion and that relying on mine alone is not enough.

I’ve learnt that developers can’t write resources for beginners even though they really, really mean the best and want to help.

I’ve learnt that even someone like me can make things too difficult for beginners and it’s important to have someone who is truly a novice to try things out.

I’ve found out that sometimes developers just want to sit and watch you use the interface whilst giving them a running commentary so they can figure out what needs to be done next.

I’ve learnt that creating good quality content takes time, creating interfaces takes time and editing information takes time.

I’ve discovered that ‘popping over to ask a quick question’ is akin to tossing an hour’s worth of work into the bin for a developer and it’s better to contact them over Slack.

I’ve found out that developers don’t read emails…

Above all, I’ve learnt that being this side of the interface is HARD WORK and although we sometimes get frustrated with developers bringing out software that doesn’t do exactly what we want it to do, it’s not through lack of trying. It’s pretty important to give developers constructive feedback explaining exactly what doesn’t work as you’d expect and what you’d like it to do instead rather than getting cross and frustrated with it. Communication is vital to ensuring that a product is the best it can be.

Finally, I’ve learnt that pi-topCODER is going to be an incredible resource when we’re done with it and I’m proud to have been part of the team working on it, even if I sometimes feel like I don’t really know anything compared to the people making it!

Swift Playgrounds

It’s about time Apple joined the Coding Revolution – with Raspberry Pi, code.org and Google running projects for years, it was only a matter of time before something was released. And boy is it a good one… with glossy graphics and slick tutorials, Swift Playgrounds has certainly hit the ground running as a way to teach coding concepts to pupils on an iPad. However, it’s not without faults, but then nothing is, so let’s take a look.

A few weeks ago, I visited Apple HQ in London along with a few CAS Master Teachers and various CAS reps and teachers. As it turned out, the majority of attendees were primary school teachers, which brings us to the first flaw in the Swift Playgrounds roll-out. The first thing we were told about it was that it was primarily made for Year 7 pupils and older and this becomes clear when you work through activities as the vocabulary is very dense and would certainly lose many younger pupils. However, the look and feel of the app is very primary-friendly which is why most of the secondary school teachers hadn’t shown an interest, assuming it was ‘not for them’. Indeed, a primary ex-colleague of mine was recently shown Swift Playgrounds and after about ten minutes, decided it would be the perfect way to teach KS2 coding, unaware of its secondary-school target audience. When you spend some time playing through and looking at it, however, you begin to realise that it is indeed best suited to KS3, particularly because of the skills it is highlighting and teaching.

So, you can see very easily just how much effort Apple have put into Swift Playgrounds and how determined they are to make it a useful classroom tool. Not only is there a wealth of content that is easy to download, there are accompanying iBooks full of Keynote presentations, information, progress charts and comparisons to the CSTA standards. Information is made as clear as possible and it is quite fun to play the games. You can explore the current playground challenge by rotating, zooming, changing angle etc. Code is presented in text boxes with lines and phrases of Swift pre-written in them, and it is still drag and drop so that pupils become familiar with the language without having to write it by themselves. This makes coding and debugging easier when they are ready to move on to independent coding. You are also able to select a different character and alter the speed at which your code is run, which adds an element of personalisation.

img_0003   img_0004You can see here the interface for downloading lessons and a selection of the different types of lesson, including one for Hour of Code. There are some interesting resources that are worth exploring as all of them are slick and well made.

 

The first tutorial is called ‘Learn to Code 1’ and it talks you through using the interface from the beginning. img_0005img_0006

At the start of the game, you are limited to a few commands, but as you move through you are offered more commands and, in the second section, you are shown how to create your own commands, or functions.

img_0007

Now, one thing that was picked up on the training that I attended was that the US curriculum for Computer Science places more emphasis on explaining functions than on the word algorithm, which is different to the UK curriculum, where algorithm is considered a core word for coding and function is a later skill to learn. It is worth bearing this in mind as Swift Playground is geared towards the US curriculum. However, this isn’t necessarily a bad thing.

Let’s take a look at the code needed for ‘Four Stash Sweep’, which is approximately halfway through Learn to Code 1, with my solution to the problem included.

My solution is certainly not the most elegant, but it does demonstrate the complexity of some of the easy tasks, I can’t imagine doing this with primary-age pupils without a lot of support – I’ve had to write three functions to make my code more efficient as well as understanding ‘for i in range’ as a loop. Don’t get me wrong, I’m not complaining about the content, but it does make it clear that Apple are right to pitch this as a KS3 resource in spite of it looking like something for the juniors. It is definitely teaching text-based coding concepts, even if you are dragging the blocks of code into place.

A bigger problem lies in its running speed. When I tested it at Apple, it worked really smoothly, everything was simple and easy to use, but of course we were using brand new iPads. In contrast, when I used it at home on an iPad mini 2, it was slow and frustrating at times. The iPad mini 2 is the minimum specification device required to use Swift Playgrounds, along with the iPad Air, meaning that some early-adopting schools are already feeling excluded unless they upgrade their iPads. Perhaps those schools should consider upgrading them, but it is upsetting when there’s no budget to do so.

So, what next?

Apple are marketing Swift Playgrounds as a way to get to grips with Swift, their open-source language which allows users to create apps and content for iOS and macOS. This is very appealing to schools and young people because, let’s face it, who doesn’t want to be the next app-store millionaire. Making learning goal-orientated makes it instantly more fun and so to present to pupils that they could eventually make a real-life app will certainly inspire them to get more interested in learning to code. The fact that when you use Xcode to write Swift, you can use a playground to test your code, is deliberate to draw a link between Swift Playgrounds and the more ‘real’ Xcode environment and is a clever move by Apple, albeit one that confused existing users as to which playground was which. Swift works across multiple systems, including Linux and therefore Raspbian and I look forward to hearing about some Apple/Raspberry Pi crossovers in the future – perhaps we’ll finally see a RPi physical computing project which is controlled from an iPad!

Where does it fit?

My gut instinct is that Swift Playgrounds would be a great tool for a flipped learning environment. Pupils could work through the game in their own time and come to school armed with questions. Teachers could discuss concepts and offer their class challenges based on the skills they’ve practised at home while using the app. I think it is a great tool for KS3 programming and a lovely way to introduce pupils to the world of programming. I would worry about a whole class just sitting and plodding through in the classroom without the teacher bothering to be involved and it would far too tempting to just sit back and let them get on with it which is why I think it would be better suited to independent work outside of the classroom so that the teacher could focus on discussing the skills and developing them in the classroom.

My initial concern that it was a little too restrictive, like Discovery Coding, have been dispelled and I think there is plenty of opportunity for pupils to explore and create once they have learnt the most basic skills. There are some lovely, interesting resources already available (I recommend taking a look at ‘Drawing Sounds’ in the Swift Playgrounds ‘featured’ tab which you can download and play with) and I look forward to exploring and creating my own playgrounds once I’m more confident and perhaps after I’ve worked through all of the ‘Learn to Code’ modules.

 

 

 

 

Headlines about Computer Science

It’s been well over two years since the new computer science curriculum was introduced in the UK. Not that long ago, Roehampton University released its wonderful Annual Computing Education Report 2015 which says clearly, in black and white, that the numbers of pupils taking computing compared to those that took ICT are significantly lower now and, more importantly, the proportion of females has dropped. Newspapers jumped onto headlines exclaiming that we should have stuck with the old ICT curriculum, but that doesn’t address a number of significant issues.

So, let’s look at the lower number of students studying computer science compared to ICT. There are two things to consider here – when I was at school, ICT was seen as a bit of a joke subject: not one that was taken seriously in academic circles. It was a subject where you learnt to use Excel and create a blog, but it was a bit of a ‘soft’ subject. I suspect that a number of the pupils studying ICT were doing so because it didn’t require quite as much work as, say, French GCSE. Let’s compare that to Computer Science – the computer science curriculum is as difficult as learning a new language because you are actually expected to learn a new language, whether that be Python, Ruby or JavaScript; for the controlled assessment, you need to write some code. It is therefore not a soft subject by any measure.

The other thing to consider is that in a number of schools, there is a fear of failure – I have heard no end of stories from teachers who have been told in no uncertain terms that only the ‘top’ mathematicians are even allowed to consider computer science – no school wants to have a drop in the percent of grades A*-C that they can brag about (or whatever the numbers are in the new system). That immediately isolates around three quarters of the pupils. While I agree that there is some correlation between academia and computer science, it is also true that many pupils with dyslexia and ASD are excellent programmers who may not succeed in maths or English, but would, in contrast, perform exceedingly well in a Computer Science GCSE. Why should we exclude pupils that are interested just because they aren’t in the top set for maths? Surely it’s better that a pupil gets a low grade GCSE in CS than get no GCSEs at all?

By the way, I’m not criticising the schools for not being confident enough to allow everyone to study CS at GCSE level. It’s the system that forces them to fear failure and to force their pupils to conform because of that fear of failure. What, then, can we do to fix it?

On top of that, we have that issue of teacher training. Some of the best teachers in the UK for teaching the ICT curriculum are being pushed into teaching computer science without any knowledge of the necessary skills and there is no time nor funding for them to learn. Of course, they’re not going to want difficult or potentially weak children when they are not confident themselves!

Another issue is that the new GCSE assumes that pupils have been learning about algorithms since they were 4 years old and spent most of their school life learning about coding from an early age. Except that most of these pupils have probably learnt ‘a bit of HTML’ in a ‘coding lesson’ in year 9 and that’s about it; you have no idea how many secondary-aged pupils have told me that is their only experience of coding at school… How can we expect them to study at an advanced level when they’ve missed out the easy level? It takes both an excellent student and excellent teacher in order to achieve this feat, so is it any surprise that both numbers studying and grade expectations are dropping?

What about the fall in numbers of girls?

Well, I loved maths at school, but I know I was in a minority – I was the only girl to get an A* in maths GCSE and I was the only girl to study maths and further maths at A-level. Maths is a traditionally boy-heavy subject so if we’re limiting students to top-set maths then yes, that does exclude a lot of girls. However, that’s not the main problem with the subject, let’s be honest…

Computer science has a massive image problem – when you think about programmers, most people will imagine a middle-aged, over-weight man. When we talk about successful people in the industry, most people will list off “Steve Jobs, Bill Gates, Mark Zuckerberg”. So, where are the women? We are seriously lacking in positive female role models who demonstrate a passion for CS and programming even though evidence suggests that women write code equally as good, if not better, than their male counterparts. How many girls out there were put off as teenagers and never really got started – I know I was! I mean, how many schools even have a female computer science teacher?

This is something I’ve been saying in various circles for quite a while, but I really don’t know what the solution is – there are some great people out there like Carrie Anne Philbin from the Raspberry Pi Foundation and groups like the Stemettes and Django Girls, but is that enough? Young women like Yasmin Bey and Cerys Lock are flying the flag for young, female coders, but they’re still not well known enough outside of our community of already-super-enthusiastic people.

My heart feels like the key is in the teacher training. At the school I used to teach at, because of my enthusiasm for coding, my Code Club was 50:50 male:female. The girls were just as excited as the boys and so far three of them have come and talked very eloquently about their coding experiences at Wimbledon Jam. I should point out that only one of the three was a ‘top set’ mathematician, but that didn’t stop the others from being passionate and enthusiastic about learning to code. I was also given the freedom to tailor my curriculum to my resources and my pupils, something not always available to state schools where results are the only thing that matters and pupils are lost in the overwhelming need to achieve.

We need to support the people on the ground level, the teachers in the classroom, to help them to nourish and enthuse both male and female students and to help them to realise that computer science is for anyone who is interested and not just one subset of society.

This isn’t a criticism of the teachers as individuals: they’re doing the best they can. However, without the right training, without the right support, how can we expect teachers in the classroom to fill pupils with a sense of wonder and excitement for CS? Something has to change.

Just so we’re clear: I’m not a feminist. I’m not saying we should be holding girls-only events and pushing a female agenda even if the girls aren’t interested, I just wish that I’d been more supported as a teenager and felt more like coding was something that was socially acceptable for a girl to do, because who knows what might have happened if I had been! I just want us to encourage and foster interest in everyone to ensure that all students get a chance to be the best that they can be, no matter what their gender, ethnicity or background.

One final, happy note – take a look at the new Raspberry Pi Pioneers competition. That’s how you encourage people to get excited about computer science! I look forward to laughing at all of the (intentionally) funny entries and hope lots of young people have fun entering!

*please note this blog reflects my personal views and not those of any company that I represent.