WiringPi v2 released…

After some months of testing and time away due to family issues, a short holiday and what-not, wiringPi v2 has been pushed to the GIT repository and is now released!

Additionally, it now has its own website: http://wiringpi.com/

Changes: 100′s. There is now a completely re-written internal structure that allows for analogRead() and analogWrite() functions (hardware permitting – e.g. on the Gertboard and other A/D converters). There is a mechanism for adding new GPIO hardware – e.g. MCP23x17 (both I2C & SPI variants) and much much more!

As usual, feedback is welcome – my plan is to run a forum on the wiringpi.com site  shortly, but for now I’ll allow comments on this post, or drop me email.

Sourdough with unbleached flour…

So as you may have read here, you might know I have a bit of a thing for baking… And so we had a little family “do” last weekend – my in-laws 50th wedding anniversary and we did an afternoon tea party for about 60 guests.

So as well as cakes, scones, and so on we needed sandwiches. Nice thinly sliced bread with the crusts cut-off, cucumber at the ready along with egg mayonnaise & cress, and so on.

Now I love baking bread, but that much bread, while perfectly possible for me to bake in a day or 2 is not possible to slice without a proper bread slicer – so in the past we’ve used local bakeries to supply the bread. This time we used Seeds2 in Totnes.

Darren there did us proud and supplied 11 loaves of varying type from white to seeded and granary. Knowing I like making my own bread, he also gave us a bag of the flour he uses – Stoats Organic unbleached strong white flour.

So I fed my sourdough starter with some and baked a loaf. Then baked another, and took some photos… The starter seems to like it – lots of activity there, and the bread rises a bit faster on it too! Possibly because most of the bread I usually make is a wholemeal flour mix, so giving it white flour with a bit more protein and gluten gave it a boost.

sourdough4Heres the latest loaf. The smell, texture/crumb and crust is all great. But the colour… That’s unbleached white flour for you! It’s a very pale yellow in the packet and It appears to darken slightly when cooking.

So wondering what they put into flour to make it white, I did some searching… Found this on Wikipedia http://en.wikipedia.org/wiki/Flour_bleaching_agent and a whole load of other things too.

A quick search for products return names like “White Glow” and “Super Glow”, and interestingly in 2011 China banned the use of flour whiteners! (Which doesn’t seem to stop online places like alibaba.com selling flour whiteners from China though)

So it seems there is fierce debate on the subject, but not everywhere! What would you do if you bought a load of bread made with white flour and cut into it and found that it was a pale yellow colour – perhaps verging on beige?

I think it’s quite brave of Seeds2 to sell unbleached white flour loaves, but at the same time, when we’re living in a society where we’re being more conscious of what we eat and how its produced, maybe they’re actually the leaders and showing us the way…

Me? I think I’m going to stick to using the wholemeal flours which I usually use, which aren’t bleached anyway, but for my cakes and biscuits? More experimentation may be required.

Oh, in-case you were wondering – this is what some of the spread looked like last weekend!

50thWell, some of it at least. There was the same again (and more!) in the kitchen which came out to top-up the platters through the afternoon.

Cheese Scones, Devon clotted cream and jam scones (jam on top!), carrot cake, polenta and almond cake (gluten free), rich chocolate cake, bakewell tart, millionaires shortbread and plain shortbreads, brownies, bara brith, a raspberry loaf, chocolate and ginger loaf, and a tower of cupcakes! (I didn’t do the big cake in the middle or the bara brith though!)

Bristol: Mini Maker Faire

So M-Shed in Bristol hosted Bristols first (mini) Maker Faire today, so a quick (well 2 hour!) trip up the A38 and M5 and myself and Rachel arrived in the morning to what initially looked like a somewhat chaotic bunch of random people setting things up…

We checked the talks timetable, booked ourselves into the first couple of talks and the afternoon one by Eben (or so we thought – more on that later!) then went for a coffee…

M-Shed is a pretty interesting place in its own right – a nice little museum exploring some of the history of Bristol, and as someone who lived in Bristol for a few years it was nice to have a look at some of the exhibits. It does warrant another trip too, it’s quite a nice little gem of a place. I left Bristol just over 10 years ago and all that area was just in the process of being re-developed at that time and the whole area looks quite good now too. (On both sides of the floating harbour!)

So the Maker Faire is basically just a bunch of folks showing off and hopefully trying to get others enthused into their projects – there are some commercial companies sponsoring the event and it was good to see Pimoroni – makers of the infamous Pibow case for the Raspberry Pi there and chat to the chaps, as well as a few other small companies selling components and embedded processor boards (e.g. PhoenoptixSoldersplash) as well as Element 14 and many others. (Sponsor list here)

There were also lots of enterprising individuals, and of-course lots of non-computer/electronics makers too! Bronze casting, knitting/weaving, pottery/clay work, soft-drink making – something for absolutely everyone.

The Bristol Hackspace took up a lot of space in the middle and were demonstrating many varied and different projects – from old pen plotters to their BBC Micro connected to a Raspberry Pi sending & receiving tweets! Sometimes I wish I’d never left Bristol, but life’s just fine in Devon!

The talks we attended were very interesting too – Justin Quinnell’s pinhole cameras was a talk about long exposure (days. months, years!) using home-made pinhole cameras – something I absolutely must do! It was also very good to listen to Eben Upton and chat briefly to Liz after the talk too – although I’ve heard Ebens Raspberry Pi talk before, it’s always changing as new things happen, and always good to see what’s at the forefront in Raspberry Pi land!

One almost disappointment was that we were unaware that we had to register for the talks before-hand – it is on their website – in small print in the banner-ad area, so was overlooked, fortunately there was space, however when we went to “register” for the talks in the morning this wasn’t made aware to us at all. It actually seemed a little disorganised on the whole (certianly at 10am when we turned up when it was supposed to open!) However it didn’t distract from the enjoyment of the day. I suspect they got more than they bargianed for – which is good, as it means that hopefully Bristol will host another Maker Fair – it’s something that I really feel the South West needs to help bring like-minded people together.

Photos of the day – some even have captions…

kettleSome kettles blowing fire that make a little noise and heat, in-front of a kettle boiling water that moves things. (The firey ones from http://illuminarium.co.uk/)

thereminThis is a Theremin being played badly by the little robot arm on the left…

thereminPiand this is the Raspberry Pi driving the robot that’s “playing” the theremin!

brushTake one toothbrush, one little vibration motor out of a mobile phone, a little battery holder and coin cell and put it on a plate… Bzzz…. and off it goes!

printer1Take an EggBot to bits. Rebuild it as this. Re-write the software and off you go (See: http://www.fastness.co.uk/)

Take a relay with 4mm banana sockets and put some bulbs on it:

relayNow put many of them on a big board:

relaysand you get an excellent relay-logic board, capable of creating simple logic (and not so simple!) gates, with the ability to perform simple control tasks here. The top of the board is a switch to enable power to the track and turn power off before the car falls off the end. This was made by students as part of the Bristol Hack Kids project (as far as I can tell – please correct if I wrong!) part of the Bristol Hackspace.

Finally, Eben doing his thing:


There was much more going on too – trouble is, I don’t think to photograph stuff all the time, so you’ll just have to look at their website and find other peoples blogs!

So all in all, a grand day out and it does remind me that maybe I should go back up to Bristol more often!

The Game of Life

One of the talks at last weeks Raspberry Jamboree was by Amy Mather – 13 years old, talking about her implementation of Conways Game of Life on the Raspberry Pi.


For many reasons – and I think it’s great to see todays young people get enthusiastic by some of this things that I myself got enthusiastic about when I started to learn about computers far too many years ago!

Back then I wrote a program in Applesoft BASIC and patiently watched it do generation after generation… taking about 15-20 seconds per generation too )-: And that was in low-resolution (40×40) graphics. High resolution just wasn’t a consideration unless you had all day to wait. Still faster than doing it on paper though!

So in the past few days when I was testing some GPIO expander chips on the Raspberry Pi for the next release of WiringPi, I was a little stuck for something to test them with – then I remembered, John Jay sent me some MCP23017 expander chips on a board along with a red+green LED matrix board, so it seemed obvious – do the plumbing, use them to test the new version of wiringPi, then implement life on the 8×8 matrix.

life1That’s showing a glider, ready to launch…

So a big thanks to Amy for reminding me that computing needn’t be challenging and sometimes some of those things I did 35 years ago are still relevant (and fun) today! (ie. wasted too much time today on this already!)

Although I have to say, life on an 8×8 matrix is somewhat challenging – (I didn’t quite get a glider and a blinker going at the same time), but in these modern days of huge displays and fast processors it gives me something else to think about!

The Raspberry Jamboree

Alan O’Donohoe is  a man with not only a huge amount of energy, enthusiasm and full of all-round niceness (for a teacher 😉 ) but has been arranging Raspberry Jams since the early days of the Raspberry Pi. Recently he arranged a Raspberry Jamboree and stated this:

On Saturday 9th, I’m organising the first Raspberry Jamboree in Manchester, UK. The principle aim of this event is to allow teachers and educators to discover and share the potential of the Raspberry Pi computer for teaching Computing Science, Design & Technology etc. A secondary aim is to share the ingredients & recipe for an effective Raspberry Jam.  We will have many members of the Raspberry Pi foundation there as well as teachers & educators from across Europe.

Although I’m not directly involved in education (yet!) I attended the event and helped run one of the workshops (PiFace with Andrew Robinson and Mike Cook), and run a 15-minute Q&A session for my own wiringPi project too.

The event sold-out! Over 360 tickets were sold for the day and the place was buzzing with people – and not just teachers/educators but enthusiasts like me who are looking to help make a difference.

From my on point of view, I was able to meet up with lots of people I’ve met online via the forums, IRC, twitter and so on, exchange ideas and thoughts and generally just hang out! Did have some embarrassment by meeting people that know me from the forums, IRC, etc., but who gave me their real names rather than their online handles/aliases – see here for my thoughts on that…

Interesting people I met included Romilly Cocking from Quick2Wire, Chris Roffey from Coding Club, “Grumpy” Mike Cook, the chaps from Ciseco, Andrew Robinson of PiFace fame, and his colleagues/students. Simon Walters @cymplecy and his motley crew who were doing the Robotics talk, and many many others too – brain like a sieve though…

The event was sponsored by CPC who had a Pi Shop on-site and who I know also helped out Simon, Ben and Jason on their robotics presentation too with some hardware they needed.

Mike Cook was showing off some of his projects featured in his new book; Raspberry Pi For Dummies – which should be available soon. (And he’s not really grumpy in real life!)

So what did I get out of it? Well I learned that schools vary considerably in their levels of funding and general knowledge in the IT department – from schools that can buy dozens of iPads to schools that have 3 Raspberry Pi’s and can’t afford £60 for 3 PiFace boards… Also, I found that while some schools have very enthusiastic IT teachers, some simply don’t as “IT” has been nothing more than glorified word-processing for so-long, the very thing that the Raspberry Pi is supposed to address is almost in-danger of not being addressed due to the lack of suitably qualified people to teach IT!

Also from my 15-minute wiringPi session – thanks to all who attended! It was really useful to get your feedback – keep it coming, please email or otherwise contact me with suggestions and ideas. I really appreciate it. Installation seems to be a key issue, so I’ll be looking at providing a .deb package for Raspbian – I know there is already a package available for Arch, but things are changing quite rapidly right now. (Gentoo Linux users generally don’t have issues installing from source, so I’ll not wory too much from that perspective!)

It was quite a long day in the end – there was the obligatory pub and food session afterwards, so it was good to mix with the varied crowds that went out. I did manage to take a few photos, so I’ll just include them below here – see if you can spot yourself 😉

cpcStoreThe CPC Pi Store – very early in the morning before people really started to arrive – it was 5 deep in people through the day!

cpcGameA “Simon”/Memory game made by CPC on their stand. Yes, there’s a Pi with a PiFace on-top in there somewhere!

main1The main presentation room – looking from the back – again I got in early before most people started to arrive, so it’s a bit empty here!

mikeCook1One of Mike Cooks projects for his book…

cisecoA “stack” of Ciseco interface boards for the Pi. The bottom one sits on-top of the Pi, and the rest just plug-in…

main2View from the stage – Prof. Steve Furber waits to give the keynote speech.

class1This is the class/demo room where the 45 minute training and demonstration sessions were held.

main3The main room filling up as Alan gives the introduction.

main4Prof. Steve Furber gives the keynote to a near-full room.

class2This is the main “classroom” starting to fill up for the PiFace demo.

wiringPi-qaThe prople who attended my 15-minute wiringPi Q&A session.

beersAndRob and a “sampler” of the beers that the pub does… Careful – at least one of those is 18% ABV …

pimoroniThis is Paul Beech from Pimoroni. A very generous guy with a cool T shirt. Note the person in the background is the waiter at our table in Pizza Express holding his tip – strange to think of a Model A Raspberry Pi as a form of currency…

pinPinsNow this is interesting for a few reasons – one is that it’s a PiBow case (See Pimoroni!) and also note the GPIO “expansion”. It’s a a short piece of ribbon cable with 2 26-pin sockets on it. It fits over the Pi’s GPIO then fits snugly against the side of the PiBow case, presenting a set of sockets for the Pi’s GPIO – so if you have an investment in male to male jumpers – which you will have if you use Arduinos, then this is a way to use them with the Pi. Of-course the pins are now the other way round, but a simple sticker on the case solved that. This great idea is from Chris Roffey.

Handles or real names?

There has been some discussion recently (and probably for a very long time too) about the use of a handle or alias vs using your real name on forums, blogs, social networks, chat systems and so on…

Way back (20+ years ago) I used to go by a few handles online, but then I decided to start to use my real name – Or something close to it – I’m usually just Gordon, or Drogon (anagram, not that you wouldn’t have guessed!), or gordonDrogon or even my email address, so I’m now firmly in the real-name camp.

I don’t have issues with people using a handle or alias, but when interactive with people online, what I do like to see is a profile type page with hopefully their real name and (sometimes as important if giving advice for purchasing stuff) their location.

I think that putting your name to something gives it weight. It gives you more credibility than just being a somewhat anonymous entity.

I also have a terrible memory for faces, names, etc. )-: and it’s caused me great embarrassment in the past – and recently e.g. 2 nights ago at the Raspberry Pi Jamboree. (although a wee touch of alcohol never helps here either!)

During the Pi Jamboree I met many people – and saw their name tags, but no reference to their handles/aliases on the forums, IRC, etc. which was a great shame as there were one or 2 people I’d really have liked to talk more with, but not knowing who they really were was a real missed opportunity.

So a request: If we meet in real life, please let me know what your online handle or alias is! Write it onto your name badge if it’s at a conference, etc. Put up a profile page somewhere that give a bit more information about you and take more responsibility for what you post.

Raspberry Jamboree

Just a quick plug for the Raspberry Jamboree in Manchester this Saturday! Orginised by the ever energetic Alan O’Donohoe (Teacher &Jambassador)

I’ll be there for the day myself – on a stand with Andrew Robinson of PiFace fame (and it looks like “Grumpy” Mike Cook has been squeezed in there too. I’ve also booked a 15-minute wiringPi Q&A slot in the “CPC Pi Shop”

Please stop by and say hello! I might even have a ladder board or 2 to demo (& sell or even give away 😉 who knows!

4D Systems Display – on Arduino!

Just to show you that I don’t just do Raspberry Pi stuff…

4D system have produced a shield that allows you to connect the Intelligent displays up to the Arduinos serial port, so I’ve ported the Raspberry Pi VisiGeni driver to the Arduino…

There’s  few small limitations on the Arduino, but for the most part the calculator demo program you see running in the Arduino is the same as the one on the Raspberry Pi (it needs to be “Arduinoised” to use the Arduino sketch setup() and loop() mechanisms, but that’s all – there’s also a feature of Arduino that makes for an intereting time printing floating point numbers, but a minor detail here!)

They’re Chickens!

So, as anyone who has kept chickens will tell you, Aardman Animations Chicken Run is a documentary…

Chickens escape. Or try very hard to…

We’ve kept chickens before, but after a year off, decided to get some more and within an hour of getting them home, one had escaped from the pen and (literally) jumped over the wall into the abyss beyond. Fortunately (amazingly!) it developed the power of flight and managed to fly up the 3m wall on the other side (another 3m away!) and ended up in our neighbours garden. Which is just as well as the local abyss is a river which is running rather rapidly right now!

The grass is always greener, eh?

(And for those who don’t know – chickens sink, so she was lucky that time)

chickensOur chickens. They are (from left to right), a Speckledy Maran, a Colombian Black Tail and a Blue Maran.

I wasn’t keen on giving them names, however they have come to be known as:

gingerGinger – the escape artist

edith2Edith II

 (Looks like another Speckledy Maran we had called Edith)

dbThe Drug Baron

(Because she’s a Colombian Black Tail)

One egg so-far – but we did expect that as we were told the Marans were either laying or ready to lay imminently.

eggNot 100% sure which chicken, but I suspect it’s Edith II that’s laying so-far.

We got them from Paul and Jill at Harepathstead Poultry in West Devon who are a family run business specialising in supply, breeding and rearing of commercial and rare breed chickens and bantams. This is the second time we’ve bought chickens from them. (But if you do decide to visit them, take wellies! East Devon is a bit soggy underfoot right now!)

And tonight we clip their wings. (Well, the primary flight feathers off one wing if you want to know the technical details – not their actual wings!)

So there you are. Maybe something a bit different from computer projects, but I’ll put this one in the cooking category!

Quick2Wire – Boards are here!

The Quick2Wire project has been in the process of designing some new interface boards for the Raspberry Pi for some time and now they have some hardware!

I got a kit from them recently comprising the main board and the GPIO expander board – soldered it up without too much difficulty and here it is:

Quick2Wire board and GPIO expander

Quick2Wire board and GPIO expander

The main board connects to the Raspberry Pi with a standard 26-way ribbon cable. To the left and right of the main board are expansion sockets for SPI devices and at the bottom is an 8-way GPIO connector and the I2C connector. I2C boards can be connected in series, so the board I have here has a 2nd I2C connector for the next board along.

On the main board, there is an 8-way connector for the Pi’s own GPIO connections. This is protected by resistors and zenier diodes in the same way as Mike Cooks Pi Breakout Board. This means that you can connect it directly to LEDs without any series protection resistors and that it’s also tolerant of 5v (or maybe more) going into the board accidentally.

The main board has a 3.3v voltage regulator which is passed to the peripheral boards. This takes the load off the Pi’s own 3.3v supply.

It also features an LED and a button – these are connected to pins 1 and 0 respectively, but via little jumpers, so if you need to use those pins for other uses, then you can.

Finally, on the main board there is a buffered serial port connected to the Pi’s on-board UART. This will drive standard 5v TTL type devices and be safe when driven by them too.

Using the board is very easy – the 8 GPIO pins are numbered 0 to 7 and use the same pin numbering scheme as wiringPi (And as I understand it, Quick2Wires own Python libraries use this numbering scheme too)

I used the gpio command in wiringPi to give it a test and didn’t have any issues.


gpio mode 0 in
gpio mode 1 pwm
gpio read 0 # Read the button
gpio pwm 1 500 # On-board LED to half brightness.

# Simple LED blink
gpio mode 1 out # Normal output
while true; do gpio write 1 1 ; sleep 0.5 ; gpio write 1 0 ; sleep 0.5; done

Taking advantage of the on-board resistors, I connected an LED directly between pin 2 on the mainboard and 0v, and

gpio mode 2 out
gpio write 2 1

and it lit up, as expected.

The I2C expansion board was easy too – I used gpio to load the I2C modules into the kernel (which then allows the user to access them without sudo, then the standard i2cdetect to probe the bus:

gpio load i2c
i2cdetect -y 1 # Rev. 2 Raspberry Pi, I2C device 1
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- -- 
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
20: 20 -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 
70: -- -- -- -- -- -- -- --                         

Device 0x20 is the I2C code for the MCP23017 GPIO expander chip, so it was detected correctly. The expansion board has a set of switches which allow for it to be set to 8 different addresses, (0x20 through 0x27) so it’s possible to have up to 8 of these boards connected if required!

A quick little program later in C, using my new wiringPi I2C helper functions and it’s working just fine:

Quick2Wire I2C Expander in use

Quick2Wire I2C Expander in use

I’ve temporarily put the program here: http://unicorn.drogon.net/q2w.c but will likely be moving it and writing something to integrate the Q2W boards better into wiringPi.

So, a nice little main board with easy to add expansion boards using SPI, I2C and the Pi’s on-board GPIO.