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!

Advertisements

An Easter gift – RPi beginner’s worksheet

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.

 

 

Upcoming Talks and Events

I’m very excited to be taking part in some events coming up where I will speaking and running workshops etc.

First up is Coding Evening in Twickenham next week – the lovely Stokes and Moncreiff pub are hosting yet another Coding Evening for us on Thursday 19th May in their upstairs function room. The folks from Pi Top are hoping to pop over and we’ll have lots of cool ideas to help teach computing so come along to find out and get some inspiration for teaching computing whether you’re a complete novice or an experienced programmer!

Next up is the annual CAS conference in Birmingham on Saturday 18th June, I’m going to be running a workshop to show teachers how to use Scratch GPIO on the Raspberry Pi – the conference is looking to be a fantastic event with loads of exciting talks and workshops running.

On Sunday 26th June, along with Albert Hickey of Egham Jam, I’m helping to launch Wimbledon Raspberry Jam – we’re aiming to make the event as family friendly as possible, with talks about Primary Coding from me, Astro Pi from Richard Hayler and various others, including a very special talk from 10 year old Izzy, who is going to share why she finds coding so interesting and exciting. We’re also going to be running Minecraft workshops and Scratch workshops to show off some cool physical computing ideas.

On Saturday 23rd July (two days before my birthday), I’ll be travelling down to my home county of Cornwall to launch the first Truro Raspberry Jam at the Truro campus of Truro and Penwith College. We will also be hoping to run talks, workshops and show & tell tables – I’m really excited as the Cornish tech community are eager to share their excellent work. The Truro Jam is being launched in collaboration with Cornwall Tech Jam, Software Cornwall, Truro and Penwith College and various other groups!

Pycon UK is moving venue this year and will be held in Cardiff City Hall from Thursday 15th to Monday 19th September and I’m hoping to be there helping out with the Education Track on Friday again. The previous two years have been incredibly good fun and great for networking and getting ideas for teaching Python in schools.

In early November, I will hopefully be helping out at Mozfest and there are various other events coming up that I hope to be involved with too so keep an eye out for announcements on twitter about other events where you can find me talking and helping out.

There are also several upcoming events that I wish I could be a part of, but am unavailable due to various other commitments so I want to mention them and urge you all to go along if you can!

First up, Grace Owolade and her son Femi are hosting their third autism and tourettes friendly Raspberry Jam in South London on Saturday 14th May. Unfortunately I volunteered an afternoon of robot building to a charity auction and so am fulfilling my promise on Saturday so I can’t go, but I really hope to be able to support Grace and Femi more in the future as I think what they are doing is so important!

On Friday 17th June, the education team at Roehampton University is hosting a Festival of Computing with lots of great workshops and talks – it should be a great day! I was lucky enough to be invited to talk, but it’s on a school day so I can’t attend!

Finally, on 11th June, the amazing Carrie Anne Philbin is hosting a CAS #include Diversity & Inclusion in Computing Education Conference in Manchester. I really wish I could attend this event as I’m sure it will be super, but I’m fulfilling yet another aucition promise and taking some children for a picnic in the park. Make sure you go if you can!

So, lots to look forward to in the coming months! Very excited and hope to see some of you at some of the upcoming events.

 

 

 

 

 

Coding Evening Part 2

Just a quick post…

I’ve met with so many lovely people in the last few weeks and I’ve mentioned my coding evening to them so I thought it was worth writing a quick post to make the event page easy to find. I also want the opportunity to explain a little about how I want the evening to run.

So, way back at the end of January, I hosted my first coding evening, with the goal of getting teachers, Code Club volunteers and Raspberry Pi enthusiasts into one room just to see how everyone is getting on.

It turned out to be a lovely evening with lots of great chat about ideas for teaching the new computing curriculum and lots of enthusiasm to repeat the event.

For next Friday I’ve once again booked the lovely function room of the Stokes and Moncreiff pub in Twickenham. I hope to have three Raspberry Pis set up for people to try out or demonstrate on. I also plan to bring loads of resources and print outs from Code Club, Code Kingdoms etc. There’s an added bonus of the pub downstairs serving beer, wine, spirits (and soft drinks) as well as pleasant food which they will deliver to the function room. There will be Code Club volunteers, technicians, Raspberry Pi fans and an iPad specialist on hand to answer your questions. It would be lovely if people are willing to stand up and talk for two minutes on a subject of their chosing, but I’m certainly not going to enforce this.

So, if you’re still interested in coming, click the link below, sign up (it’s free) and we’ll see you there for a burger, beer and a great conversation about the computing curriculum:

https://www.eventbrite.com/e/twickenham-coding-meetup-part-2-registration-15481779419

Picademy – Why Apply?

As you may have noticed, I’m a bit of a Raspberry Pi fangirl, which came from attending Picademy last July. I did what many primary schools did – heard about Raspberry Pi and bought some Maplin kits which then sat on the shelf because I didn’t really know what I was doing. I had a look on the internet, but I just wasn’t really confident enough to give them a go – I did manage to set them up once or twice and desperately tried to use LXTerminal to make a jelly baby scream, but I really didn’t know what I was doing. One day, while checking twitter I happened to see a post about Picademy and started doing some research – at that point they had hosted one Picademy and were advertising for two more in June and July – luckily for me the July course coincided with the end of term and so I made a video and sent off my application; once my place was confirmed, my school agreed to pay for my expenses and I was all set for two days in Cambridge.

The first thing I really loved about Picademy were the emails that started flying back and forth beforehand. Within an hour of being offered a place, Christine, a teacher in Bradford, had agreed with me via twitter to try to get everyone staying in the same hotel. Within a few days about 80% of us were booked into the same Travelodge on the outskirts of Cambridge and we were getting excited about meeting each other.

I was the second person to arrive and I headed down to meet Tom Sale in the hotel bar for a quick meal. As we sat there more and more people arrived, some people recognising each other, others of us being strangers to everyone – people were offering to collect other members of our group at the train station, we were starting twitter hashtags around our jokes and, much to Carrie Anne‘s dismay, the beers were flowing freely. It was a fantastic bonding experience and as the evening drew to a close, we booked our taxis to PiTowers for the morning.

The first day of Picademy we arrived and had to chose one of 4 tables – the tables were labelled with the names of 4 ‘master teachers’ from our group – much to our surprise, several of our new friends were already making a mark in the world of computing. I chose to sit with Matthew Parry, a robotics specialist working in a special school and our adventure began.

Most excitingly, we were starting Picademy on the day that Raspberry Pi B+ was launched and so everyone one of us had a brand new B+ in our goodie bags – we were the first people in the world to start using one – a huge honour!

IMG_4902     IMG_4905

After a brief intro from Carrie Anne Philbin, we were taken into another room to look at some Scratch GPIO and Minecraft coding in Python – both of which were new and interesting to me. After a lovely lunch we were then shown how to set up a PiCamera and then spent some time with Sonic Pi – Unfortunately for us, we were the only cohort to not have the experience of Sam Aaron showing us how to live code music, but I have since seen him perform and can honestly say that he is amazing!

IMG_0219 IMG_4907 IMG_4906

The lovely people at The Raspberry Pi Foundation took us out for a meal in Cambridge and then we headed to a nearby pub to start discussing our independent project ideas for the next day – there were some really cool ideas flying around like coding a Minecraft version of Portal or using plates and tin foil to make a dance mat and everyone was really excited for the next day to come around. Back in the hotel bar, more ideas were bouncing around the table, some ludicrous and some perfectly feasible.

When we sat down the next day, Matthew revealed to us his idea – while the other tables in the room split off into pairs or small groups, we stuck together and planned our Tweeting Babbage Bear.

babbage

The idea was to use the Raspberry Pi mascot Babbage Bear and make a twitter bot which photographed you and sent it to twitter; the only difficulty was getting permission to pull apart the beloved bear!

We split into teams with different task – Matthew and Hannah worked on the code for photographing, whilst Eve and I set about finding out how to tweet from the push of a button attached to the Pi with various other members of our team working on other ways to make Babbage interesting, from sounds to LED vests. All credit to Ben Nuttall of the Foundation who very patiently guided us through the set up, using GitHub and finding the right commands for Twitter API and apologies to everyone else for the massive scream of delight from Eve and myself when we finally got the code to work. We were so proud of our tweeting Babbage and particularly so when a few months later Ben turned the project into a resources on the Raspberry Pi Website.

After receiving our badges our adventure at PiTowers came to an end; however, that wasn’t the end of the story at all.

Since Picademy, not only have I kept in touch with my cohort, I’ve come in contact with members of the other cohorts via Google, Twitter and through meeting them in person at events. I’ve also made contacts with people wanting to join Picademy who want to ask my advice or just to find out about what it’s like. I’ve become part of the Pi community, making dozens of new friends, some of whom I’m finally met this weekend at the Pi Birthday party. I know that if I have a teaching or Pi problem, dozens of helpful people are simply a tweet away. Through my contacts I’ve ended up speaking at BETT and organising coding evenings and, most importantly, I’ve gained the confidence to affectively teach the children in my care as well as to share my ideas with my fellow teachers.

Picademy was one of the best experiences of my life and I would thoroughly recommend it to anyone else.

PS Here are some pics of the destruction of Babbage – not for the faint hearted!

IMG_4914 IMG_4915 IMG_4916 IMG_4917 IMG_4920 IMG_4921

PPS – this photo was captioned ‘Certifiable’ and was taken just after we became RCEs – I’m meeting these two lovely ladies for some cocktails in a few weeks so not only have I made amazing professional contacts, but I’ve also made a great bunch of friends!

IMG_4922

A Mac Geek’s guide to VNC on the Pi

Do the following in order to get VNC working on your Pi, advertised over Bonjour.

  • Plug Pi in to network and power
  • ssh into your Pi after finding out its IP address by looking at your DHCP server’s leases or scanning for the Pi using nmap (http://nmap.org/download.html#macosx)
    e.g.

    $ sudo nmap -p22 --open 10.0.1.0/24

Nmap scan report for 10.0.1.2
Host is up (0.0039s latency).
Not shown: 98 closed ports
PORT     STATE SERVICE
22/tcp   open  ssh
MAC Address: B8:27:EB:4C:3D:1C (Raspberry Pi Foundation)

$ ssh pi@10.0.1.2
pi@pi ~ $ sudo raspi-config
  • Enable the Pi to boot to desktop rather than stop at the CLI
    Set hostname to something unique from the advanced menu option
  • define http proxy if required. Either edit .bashrc or use your preferred method.
  • Update stuff and install required packages
    sudo apt-get update
    sudo apt-get install avahi-daemon
    sudo apt-get install x11vnc
  • Copy the supplied avahi service file
    sudo cp /etc/avahi/services/udisks.service /etc/avahi/services/rfb.service
  • Edit the file and change udisks-ssh to rfb and 22 to 5900. Save.
    sudo service avahi-daemon restart
  • Set a vnc password using
    x11vnc -storepasswd
  • Insert the following into ~/.config/autostart/x11vnc.desktop
[Desktop Entry]
Encoding=UTF-8
Type=Application
Name=X11VNC
Comment=
Exec=x11vnc -forever -usepw -display :0 -ultrafilexfer
StartupNotify=false
Terminal=false
Hidden=false
  • Reboot Pi. Once booted the Pi should appear in your Mac’s network browser and you should have VNC access via Screen Sharing.
  • If necessary, edit /boot/config.txt to change screen resolution. I use the following settings:

hdmi_force_hotplug=1
hdmi_group=2
hdmi_mode=16

Enjoy