Monday, 14 July 2014

First Look at the New Raspberry Pi Model B+



The latest product from Raspberry Pi was launched today and we are told is the final version of the Raspberry Pi B. It's called the B+ to reflect this and here is a first look video to wet your appetite.

What's the same?

The model B+ has many of the same features as the model B, like the processor and 512MB of RAM. It's also credit card sized, with the addition of rounded edges, and the ports sit flush against the edge instead of sticking out slightly. The operating system Raspbian is also still in use with this model and you can use NOOBS to install the latest version onto a Micro SD card.

What's different?

Lots of exciting new features on the Model B+ such as:
  • 4 USB ports so that you can use more peripherals and accessories alongside your keyboard and mouse.
  • More General Purpose Input Output pins (GPIO). 40 in total, with the first 26 remaining the same as the model B. 
  • Micro SD card slot instead of the larger SD card size.
  • Improved audio for speakers and headphones
  • Improved power consumption.


Note: That on this B+ GPIO diagram that the yellow coloured pins labelled ID_SD and ID_SC are reserved for ID EEPROM so don't use them. At boot time this I2C interface will be interrogated to look for an EEPROM that identifies the attached board and allows automagic setup and the GPIOs. 

And the price is still great at only $35!


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.