/ Raspberry Pi

Origins

Picture of a Raspberry Pi Computer

I’ll let you into a secret. I’ve not always been a programmer, in fact I’ve only been programming for a few years. Ok compose yourself, get a brandy or a cup of tea and carry on reading. I know it’s hard to believe but just over three years ago the words variable, array, integer etc, well they were alien concepts to me. I started my programming journey with an Arduino Uno which MrsP bought for me Christmas in 2011. I dabbled with it but it didn’t just click with me. So I lit up a few LEDs but soon the Arduino went into my desk drawer for a short while. But hey don’t worry I love Arduino, I use them regularly now but back then I just didn’t get “it”, what ever “it” was.

Hacking with Arduino

Hang on Les, that’s more than three years ago!?!

Well yes it was but I didn’t keep up with Arduino at that time and I went back to just messing around with HTML, CSS and copying some Javascript. In 2012 I saw a video of Rory Cellan-Jones, the BBC’s Chief Technology correspondent, with a new type of computer which ran Linux, and being a Linux user for many years this intrigued me. I was one of the many thousands who at 6am on February 29th 2012 refreshed CPC and RS website so hard that the sites went down. But I got my order in and patiently waited for my Pi to arrive..in a couple of months.
So when I got my Raspberry Pi did I instantly start coding using the latest code and build robots bent on world domination? Well no, when I first got a Raspberry Pi I had to understand how it worked so I put it all together and launched the Raspbian operating system, which was very familiar to me coming from a Debian Linux background. Right at the start there were lots of cool hacks but I didn’t know where to start so I turned to the Community.

Community, community, community (c) Jono Bacon

The Raspberry Pi is really the catalyst that started my journey into programming, but why? Quite simply it was a platform for experimentation, and if it all went wrong..well it only cost £30 so that’s not a lot to replace. By pushing myself to learn a little bit more each time I slowly developed my set of skills, I’m a typical “jack of all trades” and can turn my hand to most tasks. But what I had no idea of was coding, I knew what it was but I didn’t know how it was used to create something. So I had a steep learning curve but I learnt to de-construct the problem into smaller tasks which helped me to research, so I looked on the Raspberry Pi forums and found a thread on Python and proceeded to learn what I could. But what really grabbed my attention was physical computing.

The Raspberry Pi opened my eyes to physical computing via a language that made sense to me, Python.

Turning an LED on using code is the gateway to great things, seriously. By turning an LED on and off you can learn so much and I regulary see this "Eureka" moment in the faces of the teachers that take part in Picademy.

import RPi.GPIO as GPIO
import time
GPIO.setwarnings(False)
GPIO.setmode(GPIO.BOARD)

led_pin = 8

GPIO.setup(led_pin, GPIO.OUT)

while True:
    print(True)
    GPIO.output(led_pin, True)
    time.sleep(0.5)
    print(False)
    GPIO.output(led_pin, False)
    time.sleep(0.5)
  • Importing libraries / modules
  • Creating variables
  • Loops
  • Logic
  • Connecting an LED to the GPIO
  • Blowing up the LED
  • Using a resistor with another LED

So that’s coding and electronics in about 12 lines of code, a nice gentle start for any hacker. As it demonstrates a lot of simple key concepts for both subjects in a short amount of time.

Snake Charmer?

Hacking a weather project with Python

Python was the first language that I truly “got” and it enabled me to learn the science of computing and by extension electronics. So fast forward to today and right now I am writing around 36 Raspberry Pi tutorials a year, 3 per month for various magazines and blogs. I am still learning new things everyday and that will continue for as long as I can. The biggest catalyst for my learning was becoming self employed in 2013. I left my last job as a Project Manager for a digital agency and have never looked back. Of course for the first two weeks of my self employed career my thoughts were “What the $%^& have you done Les?” but the work came in, slowly at first and now I have many different clients who all want more and more Raspberry Pi content.

The motto?

So what is the motto for this blog post, I think it’s “Don’t be afraid, try something new and see where it takes you. Because you just might like it”

My thanks to the Raspberry Pi community and to the Foundation for their great work and support over the years.