Sunday 30 December 2012

GGD on RaspberryPi.org

Today the 'Little Box of Geek' Raspberry Pi and thermal printer project featured on the front page of the Raspbbery Pi Foundation official website.

http://www.raspberrypi.org/archives/2953

It's been a very exciting and busy day with many people getting in touch via twitter, facebook and YouTube to offer their support for my work.

If you want to get in touch, have ideas for episodes or suggestions for improvements check out:

Subscribe to the Geek Gurl Diaries YouTube Channel
Facebook Page
Twitter accounnt @GeekGurlDiaries or @MissPhilbin
Check out the Geek Gurl Diaries Website

Many thanks to everyone at Raspberry Pi for their kind words and support, and welcome to all my new viewers and followers, I hope I do not disappoint!

Friday 28 December 2012

Little Box of Geek Project - Part 2



Using the printer base as a template, draw around the printer using pen onto the cardboard box where you want your printer to be. Using a screwdriver or pencil, pierce the box so that you can comfortably get scissors inside to cut out the hole for your printer to sit in.

Do the same again for your button. (I found that a one pound coin was the same size as my button so I used it as a template to draw around.) Wrap your box in colour paper or print some labels to make it look more interesting.

We need to create a program to print on the Raspberry Pi:


First test that the printer works by writing a simple 'Hello World' style statement. Save as printer1.py (in the same directory as the printer.py file we used in Part 1 of this tutorial because it is importing from this file) and execute the program by typing python printer1.py in a terminal window) making sure that your printer is attached to your pi:
import printer

p=printer.ThermalPrinter(serialport="/dev/ttyAMA0")
p.print_text("\nHello Geek Gurl Diaries viewers!\n")
p.linefeed()
p.linefeed()
p.linefeed()


If that works, great! But what happens if we write a really long string? Will it go over multiple lines, or will the text be cut off? We should test it by modifying our code and saving it as printer2.py and executing it.
import printer

p=printer.ThermalPrinter(serialport="/dev/ttyAMA0"
p.print_text("\nHello Geek Gurl Diaries viewers!What happens if we try to print a longer sentence or paragraph? Will it go over multiple lines or will the text just be cut off? It's good to test these things you know!\n"
p.linefeed() 
p.linefeed()
p.linefeed()


It seems clear that we need to use a text wrap module to ensure that all the words fit onto each line and are not split down over multiple lines on the printout. Adapt the code in printer2.py to include the textwrap module and save it as printer3.py:
import printer, textwrap 

p=printer.ThermalPrinter(serialport="/dev/ttyAMA0"
wrapped_text = textwrap.fill("\nHello Geek Gurl Diaries viewers!What happens if we try to print a longer sentence or paragraph? Will it go over multiple lines or will the text just be cut off? It's good to test these things you know!\n"
p.print_text(wrapped_text) 
p.linefeed()
p.linefeed() 
p.linefeed()

I wanted my box to print geeky statements at anytime. I decided to use the fortune program. First Install Fortune and then install fortunes to get options to select categories of fortunes:
sudo apt-get install fortune
sudo apt-get install fortunes

By looking at the manual for fortune it is possible to use only short statements which are more suitable for my thermal printer using -s and to get specifically scientific fortunes I can use 'science'
man fortune

In a terminal window I can check to see what statements the fortune program will give me by typing:
fortune -s science

Now let's modify our program to move away from using a fixed string and instead use a Unix shell to direct the output of the fortune program to the input of our printer program. We can also add some functionality to wrap the text over 32 characters (thats how many the printer prints per line!) so that our printout looks even better. Save as printer4.py and execute:
import printer, textwrap, sys 

p=printer.ThermalPrinter(serialport="/dev/ttyAMA0"
unwrapped_text = sys.stdin.read() 
wrapped_text = textwrap.fill(unwrapped_text, 32
p.print_text(wrapped_text)
p.linefeed() 
p.linefeed() 
p.linefeed()

Test out this idea by running a terminal and typing:
fortune -s science | python printer4.py

Adding a button:


Now that our printer is printing what we want it to we need to add the button. Using a breadboard, a 10k resistor, and 6 jumper cables attach the button to the breadboard to the raspberry pi GPIO pins (I learned everything I needed to know from Adafruit Raspberry Pi GPIO Setup and Adafruit Sounds and Buttons Tutorial):





We need to write a script to detect when the button is pressed. Using a text editor type the following and save as GPIO_test.py (remember indentation is important in python!) :
#!/usr/bin/env python
from time import sleep
import os 
import RPi.GPIO as GPIO

GPIO.setmode(GPIO.BCM)
GPIO.setup(23, GPIO.IN)

while True:
if ( GPIO.input(23) == False ):
print("Printing")
os.system("/usr/games/fortune -s science | python ggd_printer4.py")
print("Printed")


sleep(1)

Finally, we want the printer program to run whenever the button is pushed and the Pi is on. Therefore we need to modify the /etc/rc.local file to reflect this by using a terminal window:
sudo nano /etc/rc.local 

Add this before exit0 making sure it points to the correct location of your GPIO_test file:
cd /home/pi/printer/ && python gpio_test.py &

Once you have tested that it all works, transfer your pi, printer, and breadboard into the prepared cardboard box and make sure everything is plugged in and sits well. Power it all up, give is a few minutes, then press the button and receive a piece of Geek wisdom.

I hope you have found this tutorial useful and enjoyable to do. My box was an idea born from seeing @blogmywiki's Little Box of Poems which he created using an Arduino. It would not have been possible without the support of Giles and @asbradbury (the best Pi Code Monkey)

Please support my work getting more teenagers (especially girls) into tech, by watching, liking and sharing my videos.

Thanks,

Carrie Anne.

Thursday 27 December 2012

Little Box of Geek Project - Part 1


You will need:





Prepare the thermal printer by connecting the cables. First plug in the data cables (green, yellow and black) to the printer. Next connect the power cable (red, black).

Cut off the end of the power connector and replace it with the solder less dc connector so that it can be plugged into a dc power supply (must be between 5 and 9v, 2a). Make sure that the red wire is put into the positive (+) and the black wire into the negative (-). Screw in tightly.

Test that the printer works with your power supply by plugging it in. If the green light flashes and when you press the paper feed button, the paper comes out, the printer is ready to be plugged into the Raspberry Pi GPIO pins.

Using male to female jumper cables attach the RX of the printer (yellow) to pin 8 and the ground of the printer (black) to pin 6 on the Pi. GPIO layout Note: Make sure you read this first :)

Connect your pi to a keyboard, mouse, monitor etc. You should have already setup your raspberry pi, if you have not done this yet check out GGD episode 5.


We need to first setup the Raspberry Pi serial port and change some settings.
Install the required files by typing the following into a terminal window.

sudo apt-get install python-serial
sudo apt-get install python-imaging-tk

Next give the serial port permission to dialout using:
sudo usermod -a -G dialout pi

We also need to edit this file:
sudo nano /boot/cmdline.txt

By deleting:
dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait

and replacing it with:
dwc_otg.lpm_enable=0 console=tty1 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait

Finally remove the last line of /etc/inittab and restart your raspberry pi using:
sudo shutdown -r now

(With thanks to natemcbean.com tutorial)



Next we need to download the python files needed to print from github. First you will need to install git-core onto your pi using:
sudo apt-get install git-core

create a directory on your pi to download your files from git hub to using:
cd~/git

to download the printer repository use:
git clone git://github.com/luopio/py-thermal-printer.git



Finally we need to edit the following file:
sudo nano printer.py 

To add this line at the top:
#!/usr/bin/env python 

and to check that it is pointing to the correct port:
/dev/ttyAMA0


Run Printer.py and a test page should print.

What are you waiting for? Hot foot it to Part 2 for more fun!


Friday 23 November 2012

Thursday Club: The Girls Hacking Club present a 'women in technology' panel.

On Thursday 22nd November I was invited to speak and be part of a panel of experts at by the Girls Hacking Club, part of Goldsmiths' Thursday Club.

The Thursday Club is an open forum for anyone interested in the theories and practices of technologies and state-of-the-art culture.

I was very excited to be invited to be part of a 'women in technology' panel discussing various projects developed to empower women in the IT industry. The panel included a stunning line up of fantastic projects in the UK:

Nela Brown is a sound artist/ technologist and researcher. She is currently doing her PhD at Queen Mary, University of London where she is also a Chair of G.Hack and WISE@QMUL. G.Hack is a collective of female researchers at the School of Electronic Engineering and Computer Science focusing on sharing knowledge and developing interactive media projects through collaboration with other universities, art organizations and industry partners. In 2011 G.Hack received funding from QMUL which kick-started a series of public engagement activities. 
http://nelabrown.blogspot.co.uk http://ghack.eecs.qmul.ac.uk 

Pollie Barden is a visual artist, game designer, web designer and technophile. She earned an M.S.P. from the Interactive Telecommunication Program at New York University and is currently doing her PhD in Media Arts and Technology at Queen Mary, University of London where she is also a member of G.Hack and in charge of co-ordinating departmental qMedia Hack Days. 
http://pabadesigns.com 

Anna-Maria Spehar-Deleze and Salzitsa Anastasova-Ivanova are postdoctoral researchers at the School of Engineering and Material Sciences at Queen Mary, University of London and members of the WISE@QMUL committee. WISE@QMUL (The Women in Science and Engineering Society) was set up in 2008 as an informal group for discussion and networking amongst QMUL students interested in the role of female participation in science. The society currently has 130 members spread across the Faculty of Science and Engineering and the Faculty of Medicine and Dentistry and welcomes men as well as women from undergraduate level to professors. In 2012 the society received substantial funding from QMUL, which enabled them to organize seminars, talks, workshops and socials in 2012 and will ensure sustainable growth in years to come. 
http://wiseqmul.wordpress.com 

Paula Graham is a director of Fossbox; a non-profit offering consultancy on collaborative working, peer support and peer training and co-founder of Flossie; a collective of women from digital and arts organisations sharing a common commitment to celebrating and enabling women’s contribution to FLOSS culture. The first Flossie conference was held in May 2012 at Queen Mary University of London and was followed by a 3 day ‘Career Taster’ in October 2012 at The National Museum of Computing in Bletchley Park. 
www.fossbox.org.uk www.flossie.org 

Heidi Harman is a serial entrepreneur, mentor and speaker and also co-founder of Geek Girl Meetup. She is currently working on her new startup in the mobile finance sector. 
www.geekgirlmeetup.com

Carrie Anne Philbin (yours truly) is a KS3 ICT Subject Leader & Google Certified Teacher at Robert Clack School in Dagenham. She is a Creator of the Geek Gurl Diaries, a youtube video series designed to inspire more teenage girls to take up STEM and Computing subjects. 
www.geekgurldiaries.co.uk @geekgurldiaries 

I was excited to network with these projects to hopefully collaborate with in the future. I'm excited to find female role models in STEM subjects who would be willing to do interviews and perhaps help me run workshops. If you love technology I would recommend getting involved with any if not all of the projects and groups listed above.

Friday 2 November 2012

Talk Talk Digital Heroes Award 2012

I'm very excited to announce that Carrie Anne Philbin of Geek Gurl Diaries has been nominated for a Digital Heroes Award by Talk Talk and is on of three fantastic finalists in the London region.


She needs your votes! So please vote and tweet about it to your friends:

Friday 12 October 2012

International Day of the Tech Girl

Geek Gurl Diaries have met lots of exciting people over the past few months, but none as exciting as Kim Wilkens whose enthusiasm for teaching and inspiring young people is infectious. Kim introduced me to the day of the tech girl and we decided to mark the day that we would try and get students from both sides of the pond sharing experiences of technology.

Some girls from Robert Clack School in Dagenham Essex, where I teach presented their experiences of our subject ICT in a short video. They talked about what they enjoyed in these lessons and what they would like to do more of, they also asked questions of the students in the USA.

7 and 8th Graders from the Community Public Charter School in Virginia watched the video and asked questions through our chat window:


Kim Wilkens: we just watched the video and they created a response video - I'll post it later
 me: Ok, do they have any questions while the girls are here?
  as we have to leave at 5pm
4:37 PM which is in 20 mins
  The girls say good morning!
 Kim Wilkens: where is the school?
4:38 PM was it 15 or 50 minutes of ICT a week?
 me: school is in East London in a place called Dagenham
  it's on google maps
  50 minutes a week
4:41 PM Kim Wilkens: is that close to bellingham?
  what kind of things do you make with the software you use?
 me: make websites, photoshop images, presentations, documents
  databases
4:42 PM Kim Wilkens: are you able to take what you learn in ICT and use it for other classes?
 me: all for different subjects like english maths or history
  yes students use their ict skills for other lessons
  create many presentations for science
 Kim Wilkens: what is their favorite subject?
 me: Lara says English
4:43 PM Sonakshi says Science!
  Miss Philbin says IT!
 Kim Wilkens: nice!
4:46 PM we're talking food here - what's your favorite? Kian says his fav food is English - shepherds pie, treacle pudding (sp?) & custard
4:47 PM me: We like Chinese food, Nigerian food, chicken, chocolate
  pizza
  we had shepard's pie on the menu at lunch in school canteen
  today
 Kim Wilkens: jealous
4:48 PM me: never heard anyone saying they were jealous of our canteen lunches before!
  now you are making us hungry as it is nearly dinner time
 Kim Wilkens: thank you all so much for sharing - tech challenges and all!
 me: we are going to have to say good bye soon, if you have any questions the girls would be happy to email your students
4:49 PM Kim Wilkens: I'll e-mail you a video link later today (I hope;-)

The female students enjoyed this opportunity to share with students in another country, and they can't wait for their video response (which I have seen, and they are going to love!) Next time we will get a video conference link working and do it in real time.

I'd really like to thank Kim, and Chad Sansing (whose class we interrupted) for sharing in this experience.

Saturday 25 August 2012

Interviewing Women with Google Hangouts

I love this infographic

Over the past month I have connected with many women working in IT who are willing to support what we are trying to do here at Geek Gurl Diaries. However time seems to be my enemy! I don't seem to have the time to edit all the video that I create.

I am hoping that Google Hangouts on Air will be my saviour, as I can have a conversational type interview and instantly upload it to our channel on YouTube without editing. Obviously all the mistakes will just have to stay.

I used this method whilst interviewing Raquel Velez in the U.S. She was so lovely, cool, and down to earth, for someone with such an amazing CV! I hope to get more interviews like this online soon.

Don;t forget to subscribe and tell your friends about us!

Sunday 1 July 2012

The Only Girl on the Team

It saddens me as an IT teacher that not that many girls take up ICT as a subject in Year 10, Year 12, or beyond. Lately I've started to think about my own experiences not only as a student of ICT but also later in life throughout all my jobs in the sector. I realised that I was the only girl in the department for every IT job that I had. WHY?

Whilst attending a conference on Monday addressing the sate of the ICT curriculum in the UK, I had a brainwave. Why not set up a channel just for girls that could highlight the cool opportunities for girls and women in IT. 

The Geek Gurl Diaries were born. So far I've created a website, designed logos and banners, set up a youtube channel and a blog, and uploaded a video on Ada Lovelace. 

Whats next? More contributions from Geek Gurl's and interviews with women working in IT hopefully!