Wednesday, 26 March 2014

Interview for Naked Scientists and Linux Voice!

I always tell you, my viewers, just how busy I am, and you're probably fed up hearing about it. Today I have proof that aside from the day job at Raspberry Pi, and the videos I make, I have lots going on!

Most notably, this month I was live on BBC Cambridge for the Naked Scientists Show, and there is a three page article from me and the rest of the EDU Pi gang in Linux Voice magazine!

Linux Voice

I'm a huge fan of the Linux Voice team, they stand up for open source software, and even give back to the open source community through their magazine. They are also huge Raspberry Pi fans, which meant that when I met up with them at the Raspberry Jamboree at the end of February 2014 with my colleagues, Ben and Clive, we had a lot to talk about!


In Issue 2 of Linux Voice Magazine p the Raspberry Pi education team!

All the photos of me are awful, so I'll be stashing my copy at the button of the publications pile for a while.  You can get your copy from newsagents this month or online from here.

The Naked Scientists

Working in Cambridge, England, has many perks. The architecture is pretty cool for one, and being near so many science related colleges makes me feel inspired. Another great thing about Cambridge is the Naked Scientists. 
The Naked Scientists are a media-savvy group of physicians and researchers from Cambridge University who use radio, live lectures, and the Internet to strip science down to its bare essentials, and promote it to the general public.
You can only imagine my excitement when they invited me onto their show with Eben Upton, CEO of Raspberry Pi. It was pretty late on a Sunday evening, so again not at my best, but you can hear the entire show in it's podcast form here. I felt very honoured to have been asked on. 

Wednesday, 19 March 2014

Get Arty with the Raspberry Pi Camera Making Time Lapse



What you will need:

  • A Raspberry Pi
  • A Raspberry Pi Camera Module
  • A Pi Camera Mount
  • Something to point at!

Setting up a Pi Camera with a Raspberry Pi

One of the best add on's for a Raspberry Pi is a Pi Camera. It is a small board that connects to a Raspberry Pi with a ribbon style cable. Connecting a Pi Cam can be fiddly as the cable needs to be the right way round for it to work.

Begin by unwrapping your Pi Camera and removing the small blue plastic from the lens. Next locate the ribbon cable connector nearest to the Ethernet port. It is a small think black connector. Pull the two clips at either ends up to open it. Place the Pi camera ribbon cable into the slot with the blue side facing towards the ethernet port and the silver connectors facing away from the ethernet port. Whilst holding the pi camera ribbon cable gently push down the two black connectors on the Pi.  Finally connect your Pi to a power source and let it boot.

That's the fiddly bit done! Now you will need to configure your raspberry pi before testing that your camera works. After logging in type:

sudo raspi-config

Select Enable Camera from the list with your keyboard and press enter. Select 'Enable' then 'Finish' and  'Yes' to reboot your Pi.

Once your Pi has booted again and you have logged in, and typed 'startx' to load the Raspbian graphical user interface, you can test that your camera works. Open a new LXTerminal window and type the following line:

raspistill -o cam.jpg

Press enter and you should see a preview of what your camera can see. It will then take a picture and save it in your home directory.

Getting Arty with Time Lapse Video

The Pi Camera takes some great resolution images, and is small enough to leave running by a window to take pictures over the course of a few hours. When you put all these images together in rapid succession you create a time lapse video. Here is an example of what you can do if you get good at time lapse photography:



To begin you will need to set your Raspberry Pi and camera up pointing out of a window somewhere. When I was in my office I pointed it out of a window at a road junction which is a bit boring, but sometimes you've got to work with what you have :)

I followed the Raspberry-Pi Spy's tutorial and I've summerised the main points here:

Once setup, log into your Pi and on the command line or from an LXTerminal window type:

mkdir webcam
cd webcam
raspistill -o image_%04d.jpg -tl 60000 -t 7200000

The last command will take a photo every 60 seconds (60000 milliseconds) for 2 hours (7200000 milliseconds) resulting in a sequence of 120 images. 
The “%04d” will result in a four digit number appearing in each filename.
Go away for two hours and when you come back you should be able to see all the pictures taken by typing 'ls' into the terminal window or on the command line.

Now you need to put them all together into a video. There are two ways in which you can do this. Firstly, you could use the Pi to create a video file, instructions for which can be found here, but this takes a long time and can result in your Raspberry Pi crashing. Instead I copied the files from the Raspberry Pi SD card via ftp to my computer. You could also use a USB memory stick to copy them over. Then using Movie Maker I added all the images and set the duration time to 0.04 before saving it as a movie.

Ta da, your very own time lapse creation!

Getting Arty with Stop Frame Animation

The Raspberry Pi is a great, cheap way to get started with stop frame animation. Here is an example of a stop frame animation I made a few years ago, it is actually my first ever YouTube video!


There is a great app created for the Raspberry Pi to help you created stop frame animations called 'Pi-mation':



All the steps you need to follow to download and install Pi-Mation can be found here. It is really easy to use.

Have fun! Point me in the direction of any of your creations. :)

Thursday, 13 March 2014

Girls in Tech Teaching Kit - Made at Mozilla Festival 2013

This weekend has been a weekend of firsts. First participation in a scrum, first time meeting some awesome educators and webmakers, first time meeting @maggiephilbin, first time hugging a giant fox, first time collaborating on a teaching kit using Mozilla Webmaker tools.

Click on the image to access the teaching kit

My Saturday begun by joining a group of webmaker educators in a build and teach the web session in which a scrum board had been set up with lots of different projects.


On Sunday I designed a badge of my own and decorated a t-shirt:


Monday, 10 February 2014

Programming Pictures with Pygame

I love 8 bit pixel graphics from old arcade games like Space Invaders! I'm not sure why I loved them so much, perhaps it's because I enjoyed those games so much as a child.


It got me thinking about making my own pictures using code. Perhaps even my own space invader animation!




To make your own Python Pixel Art you will need:

  • Square paper
  • Colouring pencils
  • A Raspberry Pi or a Computer with Python installed

Instructions:

1. Taking a sheet of paper with squares, write 1 through to 9 across one row, and 1-6 down one column to make a grid.
2. Draw your design or space invader in this grid using colouring pencils.
3. On your Raspberry Pi or computer, open IDLE and create a new text editor file by clicking on File and New Window.
4. Start your code by importing the modules you will need:

import pygame, sys

5. Next setup your pygame window using:

pygame.init()

screen = pygame.display.set_mode([225, 150])

6. Next create variables for each of the colours that you wish to use. I've used red and white here, but you can use as many colours as you like:

r = pygame.Color("red"
w = pygame.Color("white")

7. Now for the fun part, writing the code that will create your picture. Here we can use an array in Python. This is where your diagram from step 1 comes in really handy. Look at row 1 on your drawing and type the first line between square brackets [ ]. Then do row 2, then row 3 and so on:

data = [ 
 [ w, w, r, r, r, r, r, w, w ], 
 [ w, w, r, w, r, w, r, w, w ], 
 [ w, w, r, r, r, r, r, w, w ], 
 [ w, r, r, r, w, r, r, r, w ], 
 [ r, w, w, r, r, r, w, w, r ], 
 [ r, r, w, w, w, w, w, r, r ] 
 ]

8. Next we use a for loop and enumerate to display the picture how we want it. Enumerate allows us to get both the index and the data at that index for every element of the array. For instance, the first time round the outer loop, y = 0 and row = [ w, w, r, r, r, r, r, w, w ].

for y, row in enumerate(data):
  for x, colour in enumerate(row):
    rect = pygame.Rect(x*25, y*25, 25, 25)
    screen.fill(colour, rect=rect)

9. Finally we add the code that will run our pygame program and keep it displaying the image until we want to exit:

pygame.display.update()

while True:
  for event in pygame.event.get():
    if event.type == pygame.QUIT:
      sys.exit()

Challange:

Can you create two pictures and animate them?

Sunday, 9 February 2014

Competition Winners & Working at Raspberry Pi

As ever, this geek gurl has been really busy. 2013 was turly a life changing year for me, as I won an award for Geek Gurl Diaries and even wrote a book 'Adventures in Raspberry Pi'. At the end of the year I made the decision to leave teaching (which was hard and sad) to join the Raspberry Pi Foundation to educate young people globally (which is fun and yay!).


I've been at the foundation for little over a month and can say that I've never been busier! I've been speaking at events like BETT, and running workshops at Raspberry Jam events. But never fear viewers, I am continuing to make videos. Just remember, it takes time to make a final polished piece for your consumption. I'm a perfectionist, and want to you to enjoy computing as much as I do, so be patient!

In the meantime here are the winners from the video competition to win a signed copy of Adventures in Raspberry Pi:


Your prizes will be on their way to you in the next few days. All the best with your Raspberry Pi and programming projects!

Thursday, 28 November 2013

Get the Geek Gurl Diaries Badge!

I attended Mozilla festival again this year, and spent some time in the Open Badges zone creating my very own GGD badge using card, glue, and my imagination. That's the last I thought I would see of it but no! The lovely people at Mozilla made my badge for me! Check it out:




I love it! If you like making and receiving badges, why not check out Mozilla Open Badges yourself. 

Wednesday, 30 October 2013

Geek Gurl Diaries goes to House of Commons!

On Tuesday 29th October 2013, I put my on my finest frock, rallied the troops, and made my way to the House of Commons in London for the Talk Talk Digital Heroes Award Ceremony 2013.

Queen Anne Blend was my favourite, so much so I bought teabags on my way out!

First off, seeing as I was with friends and all dressed up, it seemed silly not to capitalise on the day by visiting Fortnum & Mason's Jubilee Tea Rooms in Picadilly and having Afternoon Tea. (Perhaps I've just been watching too much Downton Abbey?) 

Getting nervous waiting outside the House of Lords


After eating ALL THE CAKES we made our way to the common outside the House of Lord's to meet all the other Digital Heroes from around the UK. They had travelled from all over to my city, which made me feel very guilty indeed. We had many photographs taken of us before we made our way through the most epic security I've ever encountered. Luckily our names were on the list, so we got in!




Team GGD: +Emma B (@embre) & +Alex Bradbury  (@asbradbury) who have supported the project from it's early days and deserved a trip to the House of Commons too!

Very quickly we were whisked through various halls and chambers (which was a little sad as I really wanted to look at the old paintings and architecture, into the Churchill Rooms, where another afternoon tea, this time with Champagne, awaited us. My little party of three quickly became four, as we were joined by my local MP, Jon Cruddas (@JonCruddasMP) who kindly welcomed and entertained us as his guests. 

Lots of hand shaking goes on when you are 'Dagenham's Daughter'

Talk quickly turned to the work that I have been doing in Dagenham at my school, and the work I've been doing on Geek Gurl Diaries. In the course of two hours, the three of us gave one MP: a lecture on the importance of teaching our children computing concepts; the success of my own students; and the possibilities that their futures can hold through being exposed to computer science.   I'm not sure Jon was prepared for what he got, but I'm happy to report it resulted in him wanting to learn more, and organising a visit to my school to see my cs lessons in action. 

Receiving my award from Martha Lane Fox (Co-founder of lastminute.com) , Lloyd Embley (Editor in chief The Mirror) and Talk Dido Harding (CEO Talk Talk)

The award ceremony got into full swing when Chi Onwurah MP (Shadow Minister Business, Innovation & Skills) and Ed Vaizey MP Under Secretary of State for Culture, Communications & Creative Industries gave keynote talks expressing their congratulations to us all for our achievements and for using technology to improve our communities. Then each digital hero was presented with a framed award by the panel of judges.



It was a truly wonderful day, and I hope to continue the discussions that were started with the other digital heroes in a google+ group so that we can help support each other over the next few years. I'm also excited to reply to my MP and invite him to look at what we are doing in Dagenham, and hopefully one day, the world!

Watching this video made me cry! Thanks to Dawn Hewitson (@DawnHewitson) Stemettes (@Stemettes) and +Alan O'Donohoe (@teknoteacher) for taking part and saying such nice things.