Eben Upton Raspberry Pi Visit

Last week Eben Upton presented to a packed audience in Hursley. Luckily Stewart was taking notes and has kindly agreed to share his post on Eightbar.

by Stewart Addison (photo by Steve Haskey, who arranged the visit)

An introduction for those not familiar with the Pi …

Yesterday Eben Upton (the guy behind the Raspberry Pi foundation) took time out of his very busy schedule to give a talk in Hursley. For those who are not familiar with it, the Raspberry Pi (here is the FAQ) is basically a small credit-card sized computer circuit board with a Broadcom BCM2835 chipset and a 700MHz ARM CPU powered via a microUSB socket, HDMI+composite video output, stereo audio output, ethernet port, 2 USB ports, an SD slot used for booting the device, and another proprietary expansion port, and a high performance graphics subsystem that can decode video at full HD resolution with h.264 (MPEG-2 available at extra cost) hardware playback support in XBMC/OpenElec – all for $35 for the “model B” version. They were initially built in China, but much of the manufacturing is now in the UK and is therefore supporting the UK economy! Keyboard/mouse/power/screen/SD card are not included in that price, but many people will have suitable ones lying around to connect to it, which certainly suited me as the last thing I need is more of them cluttering the place up.

As someone who was interested in the project from some time prior to the launch it was great to see Eben in person, particularly as I’m someone who owned a BBC Micro and lost many hours to Elite (co-written by David Braben, who is also involved in the project). If that though is making any of you feel nostalgic, why not try the ZX Spectrum port of Elite running in a java applet!) The Pi as a project is trying to bring back a bit of that sense of “playing” that the BBC Micro probably did better than any other machine of its time.

(Quick disclaimer: This article is a mix of things that Eben spoke about from the notes I took, plus a few extra pieces of background information and external links that I have added myself)

The detailed background to the original idea was something I had not heard in detail before. A director of studies at St.John’s college in Cambridge, he was concerned by the declining numbers of applicants for computing university positions, as well as a drop in the quality of those applicants (basically changing from getting many people of the type who could likely already code in assembler for two different architectures to a smaller number who’s experience predominantly “I know HTML” – people who would need more time spent educating them to get to a suitable standard to teach them further) This meant that it would take longer to get them to an adequate standard on the low level aspects of computing – or by throwing them at Standard ML programming for 6 weeks to make them depressed (I remember going through that!)

 

BBC Micro comparisons

I mentioned the BBC Micro in the opening paragraphs – earlier this year there was a “Beeb@30” event to celebrate 30 years of that machine, and here is a BBC article looking back on it. It hass been well documented that they did try to get the BBC branding on the device, but the “unique way the BBC is funded” means that it was nowhere near as easy for the BBC to support such a commercially available device as happened in the 1980s. Having said that, the ARM-designed processor used in the Pi (and probably, your mobile/cell phone) had is roots in Acorn (here is a brief history of ARM) who built the BBC Micro. And there is a – possibly somewhat indulgent – project to port RISCOS (the OS designed for the BBC Micro’s successor – the Archimedes) to the Pi.

The other thing of note on the Pi is the GPIO port. Now one of the things that made the BBC Micro special was the inclusion of easy I/O on the device, through the “user port” and “parallel port”. In fact even the “joystick” port was marked as an “analogue in” to plant the suggestion it’s use could extend far beyond games. This allowed a good quality of control of external devices and responding to inputs, something that allows many more interesting control projects to be done with it. At school I did a prototype satellite tracking system using it! But I digress, the GPIO port on the Pi even looks superficially very similar to the user port on the BBC Micro. The most popular interface using it so far is the Gertboard. (I wish a could remember the name of the blue boards we used on the BBC Micro – anyone know?)

 

A squashed marketplace

Another good point raised by Eben was about where the previous marketplace for the BBC Micro and comparable machine has now in modern times. With the home computers of the 80s you powered them on and you got a command prompt for a programming language interpreter that almost begged you to start programming straight away – almost as though, as Eben said, you had to actively choose not to program! It was easy for anyone to go into their local computer store and make them display scrolling rude messages up the screen, and anyone owning one of those computers would have almost certainly had the knowledge to do so!

Nowadays it is less easy. Games consoles have taken over the high performance graphics market, with high barriers to development entry. It a similar story for the consumer tablets on the market at present – from a practical perspective the development needs to be done in another environment rather than on the device itself. Even most consumer PCs do not ship with any reasonable programming language out of the box. While that is less of an issue in the high download speed internet of today, during the 90s it took real will and effort to be able to program. The concept of having to choose not to program got completely lost. And that is some of the spirit that the Raspberry Pi is now trying to recreate. It does appear to be a bit of a gap in the market, even ignoring the Cambridge admission quality problem. There are real low-level boards around, but not so much of an all-in-one device like the Pi. And one interesting thought was that the aforementioned relatively simple bloat-free non-content-enriched RISCOS with the ease of switching to a traditional command line from the desktop, could rekindle some of the mentality from the 80s home computers.

 

Interest and getting to market

The amount of early interest in the Pi took the foundation by surprise – 600,000 views on Rory Cellan-Jones (BBC Tech correspondent) brief video with Braben – could that really be an indication of how big the market was for such a device? And could they deliver that many at the target price point, which was pretty much set at $25 from the start (At the time of writing only the $35 model B mentioned in the first paragraph – which includes a 100Mbit ethernet port, 2 USB ports instead of one and the 512Mb upgrade recently announced – is shipping). But the foundation has kept to the target price point for the units, and the 512Mb upgrade for the model B has not resulted in a price change. The other remarkable thing was the number of downloads – in the tens of thousands – of the SD-card operating system image for the Pi that was released some time before the device was even on sale, so no-one could use it!

The vendor partnerships with Farnell/Element14 and RS were important as it allowed them to move from being a risk-averse charity to more of an IP licensing company to get the number of units they were going to need. And it was a good decision. The first day on sale, as those like me who were up at 6am to order will be aware, was a bit of a disaster (and I blogged to vent my frustration at the time, questioning the motives of many of those buying and how it was pitched by some parts of the media). 100,000 orders were placed by the lucky people who even managed to get to the manufacturing partners (Farnell/Element14 and RS) websites. Both crashed badly under the load, preventing people from buying their resistors or other electronics from those suppliers, not just Pis! A lesson in robust scalable web sites for those two companies.

Another interesting point for those who have been interested in the Pi is that although most of them used in relatively rich countries such as the UK and will therefore make use of the on-board HDMI output (HDMI-DVI-D adapters can be had for under £2 on ebay if needed – make sure you get male/female as required for your setup!), the Pi also has a composite analogue video output. For me, this is convenient as it allows me to attach it to my in-car screen, but as Eben pointed out it also allows it to be sold in much poorer/emerging countries in the world, where second hand analogue TVs are still in use, and the Pi can give them a new lease of life for a price point far less than, for example, a tablet.

So it was good to have the talk from Eben, and I chatted to him about some other things afterwards. Fantastic to get his time, and of course this blog has been written in a browser running on one of my Pis 🙂

 

Recent hacktivity

This time of year seems to be hacking season and over the last few days I’ve been along to two hackdays!

Friday was IBM’s internal Social Business Hackday. There was some MQTT hacking, a z/OS hack, hacks with Lotus Connections, hacks that could be the future of Lotus Connections, and I was attempting to hack a work around for a Jazz work item. And that was just at the Hursley local event! We were able to link up with a few other labs, but over two days there were IBMers hacking around the globe. There are going to be a lot of amazing projects to choose from when it comes to voting.

(There are a few more photos from HackDay X, and previous hackdays, on the IBM hackday group on flickr.)

For round two, today was the soutHACKton hack day. By the time I arrived the soldering and drilling had already begun!! Unfortunately I wasn’t able to stay long so I’m hoping there’ll me more of these in the future. I did just about have time to try out an idea I had to hack an old doorbell to sense people using the door knocker. A while ago I had accidentally created a touch sensor with a 555 timer while attempting to build another circuit. So my cunning plan was to deliberately create a 555 touch switch and connect it to the bolt on the inside of the front door. Unfortunately the best I could manage today was a two wire touch sensor, which isn’t going to work. At least not without leaving a wire hanging out of the letter box with some instructions attached! Unless someone who knows more about electronics can suggest a plan B, I may just resort to a boring doorbell button instead!!


Recent hacktivity

This time of year seems to be hacking season and over the last few days I’ve been along to two hackdays!

Friday was IBM’s internal Social Business Hackday. There was some MQTT hacking, a z/OS hack, hacks with Lotus Connections, hacks that could be the future of Lotus Connections, and I was attempting to hack a work around for a Jazz work item. And that was just at the Hursley local event! We were able to link up with a few other labs, but over two days there were IBMers hacking around the globe. There are going to be a lot of amazing projects to choose from when it comes to voting.

(There are a few more photos from HackDay X, and previous hackdays, on the IBM hackday group on flickr.)

For round two, today was the soutHACKton hack day. By the time I arrived the soldering and drilling had already begun!! Unfortunately I wasn’t able to stay long so I’m hoping there’ll me more of these in the future. I did just about have time to try out an idea I had to hack an old doorbell to sense people using the door knocker. A while ago I had accidentally created a touch sensor with a 555 timer while attempting to build another circuit. So my cunning plan was to deliberately create a 555 touch switch and connect it to the bolt on the inside of the front door. Unfortunately the best I could manage today was a two wire touch sensor, which isn’t going to work. At least not without leaving a wire hanging out of the letter box with some instructions attached! Unless someone who knows more about electronics can suggest a plan B, I may just resort to a boring doorbell button instead!!


Conversational Internet

tl;dr

We’ve built a prototype to show how we could interact with the Internet using a command-driven approach.

  • A screen reader, but one that uses machine learning and natural language processing, in order to better understand both what the user wants to do, and what the web page says.
  • One that can offer a conversational interface instead of just reading out everything on the page.

It’s a proof-of-concept, but it’s an exciting idea with a lot of potential and we’ve got a demo that shows it in action.

The problem : screen readers today

I’ve written about this before but here is a recap.

Visually impaired people can interact with the web using screen readers. These read out every element on a page.

The user has to make a mental model of the structure of the page as it’s read out, and keep this in their head as they arrow-key around the page.

For example, on a news site’s front page, once the screen reader has read out the page, you have to remember if the story you want is the fifth or sixth story in the list so you can tab the right number of times to get to it.

Imagine an automated telephone menu:
“for blah-blah-blah, press 1, for blather-blather-blather, press 2, for something-or-other, press 3 … for something-else-vague, press 9 …”

Imagine this menu was so long it took 15 minutes or more to read.

Imagine none of the options are an exact match for what you want. But by the time you get to the end, you can’t remember whether the closest match was the third or fourth, or fiftieth option.

The vision : a Conversational Internet

Software could be smarter.

If it understood more about the web page, it could describe it at a higher, task-oriented level. It could read out the relevant bits, instead of everything.

If it understood more about what the user wants to do, the user could just say that, instead of working out the manual navigation steps themselves.

The vision is software that can interpret web pages and offer a conversational interface to web browsing.

Continue reading

Man vs Horse

Today I did something a little different, instead of going to the local park to run 5km at Parkrun I set off to the New Forest to take part in a little event that Helen Bowyer had put together. The plan was to run 15km across the New Forest broken up in to 3 5km between pubs in a race against Helen on her horse Muttley. There where 7 runners from the ETS team, Me, James, Luke, Graham, Joe, Dominic and Peter also Rob on his road bike.

The runners and the Helen would be taking the same route with the runners getting a 10min head start on each leg. Rob had a route that was about twice as long and set off at the same time as Helen.

Leg 1

From The Rock at Canada Common to The Lamb at Nomansland. We set off across Canada Common from the back gate of The Rock, reasonably early on myself, James and Luke hit the front. Luckily Luke had run the route for this leg before so we didn’t have to do any looking at the map and managed to make our way to the Dealze Wood easily enough. We could probably have cut the corner a bit at the end and shaved some more time off. We had about a 5 min lead on Rob and another 3 over Helen (though she did have to detour a little to point Peter in the right direction).


View Leg 1 in a larger map

Leg 2

From The Lamb to The Royal Oak at Fritham. This was the shortest leg, but after a short climb through Bramshaw Wood it was across the open plain. The good view meant that Helen could see us and helped by the soft ground meant Muttley could go faster and caught us up with about 800m to go. Rob arrived pretty much at the same time as well.


View Leg 2 in a larger map

Leg 3

From The Royal Oak to The High Corner Inn. Jame, Luke and me hit the front again setting off, but the fact I’ve not been doing much more than 5ks recently really started to bite. I managed to stick with them both for the first half until we crossed the stream then we started to spread out. The spread ended up big enough that I lost site of Luke and James was long gone. I had a small nav failure at the bottom of the last climb up to the High Corner Inn, I think it was just my subconscious not wanting to climb, as I went past by about 400m and had to turn round and come back. Rob was first back this time.


View Leg 3 in a larger map

After we’ve finished we all went back to The Royal Oak for some lunch. It was a really good day out and I’m really up for having another go next year and maybe even have a look at the full marathon version at some point.

Man vs Horse

Today I did something a little different, instead of going to the local park to run 5km at Parkrun I set off to the New Forest to take part in a little event that Helen Bowyer had put together. The plan was to run 15km across the New Forest broken up in to 3 5km between pubs in a race against Helen on her horse Muttley. There where 7 runners from the ETS team, Me, James, Luke, Graham, Joe, Dominic and Peter also Rob on his road bike.

The runners and the Helen would be taking the same route with the runners getting a 10min head start on each leg. Rob had a route that was about twice as long and set off at the same time as Helen.

Leg 1

From The Rock at Canada Common to The Lamb at Nomansland. We set off across Canada Common from the back gate of The Rock, reasonably early on myself, James and Luke hit the front. Luckily Luke had run the route for this leg before so we didn’t have to do any looking at the map and managed to make our way to the Dealze Wood easily enough. We could probably have cut the corner a bit at the end and shaved some more time off. We had about a 5 min lead on Rob and another 3 over Helen (though she did have to detour a little to point Peter in the right direction).


View Leg 1 in a larger map

Leg 2

From The Lamb to The Royal Oak at Fritham. This was the shortest leg, but after a short climb through Bramshaw Wood it was across the open plain. The good view meant that Helen could see us and helped by the soft ground meant Muttley could go faster and caught us up with about 800m to go. Rob arrived pretty much at the same time as well.


View Leg 2 in a larger map

Leg 3

From The Royal Oak to The High Corner Inn. Jame, Luke and me hit the front again setting off, but the fact I’ve not been doing much more than 5ks recently really started to bite. I managed to stick with them both for the first half until we crossed the stream then we started to spread out. The spread ended up big enough that I lost site of Luke and James was long gone. I had a small nav failure at the bottom of the last climb up to the High Corner Inn, I think it was just my subconscious not wanting to climb, as I went past by about 400m and had to turn round and come back. Rob was first back this time.


View Leg 3 in a larger map

After we’ve finished we all went back to The Royal Oak for some lunch. It was a really good day out and I’m really up for having another go next year and maybe even have a look at the full marathon version at some point.

Even More MQTT enabled TVs

Kevin Modelling the headset

A project at work recently came up to do with using one of the Emotiv headsets to help out a former Italian IBMer who was suffering from locked in syndrome. The project was being led by Kevin Brown who was looking for ways to use the headset to drive things sending email and browsing the web but he was also looking for a way to interact with some other tech around the house. The TV was the first on the list.

Continuing on from my previous work with controlling TVs and video walls with MQTT I said I would have a crack at this. My earlier solution was limited to LG TVs with serial ports and this needed to work with any make so a different approach was needed. It also needed to run on Windows so it was also a chance to play with C# and .Net.

To be TV agnostic it was decided to use a USB IR remote from a company called RedRat. They make a number of solutions, but their RedRat III was perfect for what was needed.

RedRat IR transmitter & receiver

The RedRat API comes with bindings for C++, .Net on Windows (and a LIRC plugin for Linux). The RedRat III is not just a IR transmitter, it is also a receiver which means it can “learn” from existing remote controls so it can be used with any TV.

Kevin is using Emotiv headset to drive Dasher as the input device. Dasher is a sort of keyboard replacement that allows the user to build up words using at a minimum a single input e.g. a single push button. As well as building words other actions can be added to the selector, Kevin added actions for browsing and also to control the TV. These actions publish MQTT messages to a topic with payloads like “volUp”, “chanDown” or “power”.

So now we had the inputs it was time to get round to writing the code to turn those messages into IR signals. There are 2 MQTT .NET libraries listed on the MQTT.org software page. I grabbed the first off the list MqttDotNet and got things working pretty quickly.

The following few lines sets up a connection and subscribes to a topic.

String connectionString = "tcp://" + 
  Properties.Settings.Default.host.Trim() + ":" +
  Properties.Settings.Default.port;
IMqtt client = MqttClientFactory.CreateClient(connectionString, "mqtt2ir");
try
{
	client.Connect(true);
	client.PublishArrived += new PublishArrivedDelegate(onMessage);
	client.ConnectionLost += new ConnectionDelegate(connectionLost);
	client.Subscribe(Properties.Settings.Default.topic.Trim(), 
	  QoS.BestEfforts);
}

Where the onMessage callback looks like this:

bool onMessage(object sender, PublishArrivedArgs msg)
{
	String command = msg.Payload.ToString().Trim();
	IRPacket packet = loadSignal(command);
	if (packet != null) 
	{
		redrat.OutputModulatedSignal(packet);
	}
	return true;
}

MQTT2IR Settings Window

And that is pretty much the meat of the whole application, the rest was just some code to initialise the RedRat and to turn it into a System Tray application with a window for entering the broker details and training the commands.

Unfortunately just a few days before we were due to have delivered this project we learned that the intended recipient had picked up a respiratory infection and had passed away. I would like to extend my thoughts to their family and I hope we can find somebody who may find this work useful in the future.

Even More MQTT enabled TVs

Kevin Modelling the headset

A project at work recently came up to do with using one of the Emotiv headsets to help out a former Italian IBMer who was suffering from locked in syndrome. The project was being led by Kevin Brown who was looking for ways to use the headset to drive things sending email and browsing the web but he was also looking for a way to interact with some other tech around the house. The TV was the first on the list.

Continuing on from my previous work with controlling TVs and video walls with MQTT I said I would have a crack at this. My earlier solution was limited to LG TVs with serial ports and this needed to work with any make so a different approach was needed. It also needed to run on Windows so it was also a chance to play with C# and .Net.

To be TV agnostic it was decided to use a USB IR remote from a company called RedRat. They make a number of solutions, but their RedRat III was perfect for what was needed.

RedRat IR transmitter & receiver

The RedRat API comes with bindings for C++, .Net on Windows (and a LIRC plugin for Linux). The RedRat III is not just a IR transmitter, it is also a receiver which means it can “learn” from existing remote controls so it can be used with any TV.

Kevin is using Emotiv headset to drive Dasher as the input device. Dasher is a sort of keyboard replacement that allows the user to build up words using at a minimum a single input e.g. a single push button. As well as building words other actions can be added to the selector, Kevin added actions for browsing and also to control the TV. These actions publish MQTT messages to a topic with payloads like “volUp”, “chanDown” or “power”.

So now we had the inputs it was time to get round to writing the code to turn those messages into IR signals. There are 2 MQTT .NET libraries listed on the MQTT.org software page. I grabbed the first off the list MqttDotNet and got things working pretty quickly.

The following few lines sets up a connection and subscribes to a topic.

String connectionString = "tcp://" + 
  Properties.Settings.Default.host.Trim() + ":" +
  Properties.Settings.Default.port;
IMqtt client = MqttClientFactory.CreateClient(connectionString, "mqtt2ir");
try
{
	client.Connect(true);
	client.PublishArrived += new PublishArrivedDelegate(onMessage);
	client.ConnectionLost += new ConnectionDelegate(connectionLost);
	client.Subscribe(Properties.Settings.Default.topic.Trim(), 
	  QoS.BestEfforts);
}

Where the onMessage callback looks like this:

bool onMessage(object sender, PublishArrivedArgs msg)
{
	String command = msg.Payload.ToString().Trim();
	IRPacket packet = loadSignal(command);
	if (packet != null) 
	{
		redrat.OutputModulatedSignal(packet);
	}
	return true;
}

MQTT2IR Settings Window

And that is pretty much the meat of the whole application, the rest was just some code to initialise the RedRat and to turn it into a System Tray application with a window for entering the broker details and training the commands.

Unfortunately just a few days before we were due to have delivered this project we learned that the intended recipient had picked up a respiratory infection and had passed away. I would like to extend my thoughts to their family and I hope we can find somebody who may find this work useful in the future.

Hursley Celebration

Today is one of those great days in Hursley when everyone lifts their head and gets away from their desk for a little while…

Car Fair

OK, so excuse the quality of that picture as it’s just a quick snap from my phone. Every few years we have a classic car fair on site, there seems to be no rhythm to when they’re held, possibly it’s just long enough since we’ve all forgotten about the cars we saw at the same show last time round – but I’m sure there are some different ones too.

Today’s celebration is under the guise of an Olympic celebration so in addition to the car show there’s a big quiz taking place, a careers fair, several different “sporting” events (such as egg and spoon race and the like) so it’s as much a summer fair as anything else; and it’s not raining which is always a bonus. The real draw of course is the free cookie or scone and drink of course, but however you look at it, to have these sorts of events on site (and such a lovely site on a summers day) is absolutely brilliant. It’s a great chance for us all to take a little time away from the desk in the afternoon, catch up with friends, see what’s going on while enjoying ourselves and having a bit of fun.

<edit>More pictures are coming in of the event on Twitter…</edit>
Reproduced with permission from Simon Maple
Delorean at Hursley by Simon Maple

Reproduced with permission from Peter Anghelides
Looks like the IBM Hursley car park is full again

Natural Language Processing Course


Over the first few months of this year I have been taking part in a mass online learning course in Natural Language Processing (NLP) run by Stanford University.  They publicised a group of eight courses at the end of last year and I didn't hesitate to sign up to the Natural Language Processing course knowing it would fit very well with things I'm working on in my professional role where I'm doing more and more with text analytics and continuing my work in speech to text.  There were others I could easily have signed up for too, things like security or machine learning, more or less all of them are relevant for something I'm doing.  However, given the time commitment required I decided to fully commit to one course and the NLP one was to be it.

I passed the course with a grade of 85% which was well above the required 70% pass mark.  However, the effort and time required to get there was way more than I was expecting and quite a lot more than the expected time the lecturers (Chris Manning and Dan Jurafsky) had said.  From memory it was an 8 week course with 10 hours a week required effort to complete the work. As it went on the amount of time required went up significantly, so rather than the 80 hours total I think I spent more like 1½ times that at over 120 hours!

There were four of us at work (that I know of) who embarked on the course but due to the commitment of time I've mentioned above only myself and Dale finished.  By the way, Dale has written an excellent post on the structure and content of the course so I'd suggest reading his blog for more details on that stuff, there's little point in me re-posting it as he's written such a good summary.

In terms of the participants on the course, it seems to have been quite a success for Stanford University - this is the first time they have run courses in this way it seems.  The lecturers gave us some statistics at a couple of strategic points throughout the course and it seems there were around 40,000 people registering an interest, of which around 5000 were watching the lecture material and around 2000 completed the course having taken part in the homework assignments.

I'm glad I committed as much as I did.  If I were one of the 5000 just watching the lectures and not doing the homework material I don't think I would have got as much out of it, but the added time required to complete the homework was significant so perhaps there's a trade-off here?  It's certainly the first time I've committed this much of my own personal time (it took over the lives of myself and Dale for quite a few weeks) as I was too busy at work to spend many business hours working on the course so it was all done in evenings and weekends.  That's certainly one piece of feedback I gave at the end of the course, Stanford could make the course timing more flexible but also allow more time for the course to be completed.

My experience with the way the assignments were marked was a little different to the way Dale has described in his post.  I was already very familiar with the concepts of test, development and held-out sets (three different sets of data used when training NLP systems) so wasn't surprised to see that the modules in the course didn't necessarily have an exact answer to them or more precisely that the code your wrote to perfectly analyse some data on your local system may not get full marks as it was marked against a different data set.  This may seem unfair but is common practice in all NLP system training that I know of.

All in all, an excellent course that I'm glad I did.  From what I hear of the other courses, they're not as deeply involved as the NLP course so I may well give another one a go in the future but for now I need to get a little of my life back and have a well earned rest from education.