Minishift on Raspberry Pi

Well, that was a fight and a half.

I've finally got the Minishift that I was building connected to the Raspberry Pi and working. This turned out to be a lot less trivial than I expected. One of my strongest beliefs is that the best way to learn stuff is to try and do things. I've sure learned a lot this time. 

You can put items into the Minishift in a variety of ways. It supports SPI (Serial Peripheral Interface), so you can just connect an Arduino (or probably a Raspberry Pi) directly and it should just work. However, it is supplied with a rather spiffy USB-SPI interface and so I thought I'd use that instead. It looks neat. 

So I plugged the board into my Pi and up popped a new HID (Human Interface Device) in the dev folder. So I thought all I'd have to do was install the Minishift Python program and I'd be good to go.

Wrong. Wrong, wrong, wrong. 

What I had to do (from memory, there may be steps I've forgotten) was to:

  • Update everything
  • Upgrade everything
  • Install missing things
  • Install python-dev
  • Install pip
  • Install minishift
  • Install Cython
  • Install libusb
  • Install udev
  • Install hideapi
  • Remember to run Python as super user so it could see the device

Anyhoo, it now works fine and the hardware looks great. The next step is to get a perspex case for the Pi and then make a little mounting bracket so I can put the Pi and the display on the wall somewhere and have a clock/RSS feed reader/weather forecast thing going. 

The MiniShift is great fun to build. You can find it on Tindie

Our New Robots have Arrived

It is with a heavy heart that I've had to retire the .NET Micro Framework robots that we've been using for teaching our embedded module for the last few years. They served us very well but wear and tear on the mechanical bits has meant that they are having to be put out to pasture....

The good news is that the replacements devices have arrived (or at least some of them). We are using the Arduino bot which has one or two useful attributes, including a dual processor design, a spiffy LCD panel and a bunch of line following leds. 

Now all I have to do is update all the courseware.....

Home Made Minishift Spacers

I spent a very happy afternoon making up an ArachnidLabs MiniShift that I got a while back. At least I was very happy until I got to the point in the instructions where it said "Now, take one of the spacers and fit it to the circuit board..."

Of course I'd lost mine.

However, the good news is that I happen to have a 3D printer. And so I was able to design and print a set in a rather attractive blue colour and then continue the build. I've not tried firing them up yet. That's for next week.

Photographing Custard for C#

You probably ought to know that the custard colour has been slightly enhanced here....

You probably ought to know that the custard colour has been slightly enhanced here....

I'm presently updating the C# Yellow Book for next year. The next version will be the custard edition. Last year it was the "Rubber Duck", and before that we had the "Daffodils" one.

I've no idea what we will use next year. 

Anyhoo, this meant that we needed a picture of some "stunt custard" in a specially purchased jug.......

Raspberry Pi B+ Tabletop Upgrade

Still a work in progress...

Still a work in progress...

It's been nearly two years since I started on my Raspberry Pi powered arcade tabletop. I got it to the point where it was just about working and promptly lost interest. For a considerable while the poor thing has been languishing in my office. I even took the drastic step of removing the monitor in the hope that the sight of the empty hole might motivate me to actually finish it off. 

Anyhoo, this week I've decided to actually get the project finished. I've made an arrangement with Robert that if I've not got the table finished by the time he comes back from his travels I'll give him fifty quid. I figured that this would force the issue nicely. So far it is working....

Another reason for finishing it off is that I needed a solid reason to play with the new Raspberry Pi B+ device. This has lots of advantages for this project. It has four USB ports so I don't need a USB hub or separate power supply. I now just need two power cables to the device. One for the monitor and the other for the Pi. 

My B+ arrived today and I spent a little while getting it going. There is actually an operating system image specially for emulating games machines now, it is called PiPlay and it is rather nice. You just download the image and it has emulators for lots of devices. It hooks into Mame4All, which is the latest incarnation of Mame for the Raspberry Pi. 

However, I found that Mame4All is not quite what I want for all the games I want to play. It is based on a slightly older version of Mame which is good because it performs better, but bad because it is missing one or two crucial features. The biggest omission is the lack of the "cocktail table" button.

One of the things I want to be able to do is have a player at each end of the table so that they can get proper Player 1 vs Player 2 action. This means that I need to be able to invert the screen when each player takes their turn. Mame4All doesn't do this, but AdvMame does.  But then Mame4All works with some games that AdvMame doesn't like...

So it looks like I'm going to have to have several different Mame installations installed and then write a script that fires up the appropriate version depending on which game we want to play. Which shouldn't be too much of a stretch.

As for the Pi B+, it works very well. The only problem that I've found is that if you connect a USB device that wants a fair amount of current, for example a USB hub or speaker, it causes the Pi to reset. I think there are some settings that you can adjust to allow more current from these ports. I'll have find out more about this. 

I've also ordered some glass from Jack's Glass for the top. I just hope that Robert will be impressed when he gets back....

Haynes Motor Museum

Maybe one day....

Maybe one day....

One of the places that we visited on our holiday travels was the Haynes Motor Museum in Yeovil. If you like cars you'll love it there. They had some wonderful vehicles and a Mini that had been cut in half (as opposed to the one I used own, which fell in half all by itself). 

You could see all the inner workings of the Mini and I think I rather bored number one son as I went around the exhibit identifying each of the components that I'd had to replace on mine. 

If you are in the area you really should go and look around. They do go-karting too.

Guinea Pigs On the Run

Wanted in most states....

Wanted in most states....

We've had guinea pigs as pets for ages now. I quite like them, in that I strongly believe in having pets that are more stupid than you are. And with guinea pigs I've felt quite safe in this respect. Until now.

We fetched the two newest members of the family on Sunday. As soon as I found out that one of them was all black I wanted to call him "Darth". This didn't go down too well, the name "Licorice" being preferred. However, having seen him in action, we are starting to think that Darth might be more appropriate. 

They escaped last night. I'm convinced that Darth was the ringleader in the break for freedom. What should have been a quiet evening was instantly turned into a festival of fear and panic as they ran every which way and loose. I managed to catch Darth after a while and the other one (provisionally named "Henchman") was apprehended by the simple expedient of dropping a tea towel on him as he ran across next door's garden. 

At present their cage is surrounded by second level perimeter system and we are making plans to move them into more high security quarters which should keep them where we want them.

For now...

Lights and Taps

No more drips...

No more drips...

The lawn needs mowing. The upstairs is covered in discarded music CDs. And the kitchen tap has been dripping for ages. A perfect time to start building a computer controlled led display for downstairs. Or perhaps not.

At least I've fixed the tap now. Modern taps are strange. When it started to drip I went up town and bought every sized tap washer that I could find and then set to.

As soon as I took a proper look at the tap I discovered that it doesn't use a standard washer, it uses some strange right angled tap device. A quick search on the internets revealed that a lot of people solve this problem by purchasing new taps. Which wasn't entirely helpful.

So I did a more careful search and came up with these beauties. They dropped in as a direct replacement and work a treat. A little tip though. Make sure that you put them on the correct sides otherwise you'll end up on Amazon complaining that the replacement taps work fine but their action has reversed and the up position is now on rather than off....

I'm going to tidy upstairs and mow the lawn later. And the lights and controller boards are in stock. I love having a project on the go...

Buy The Disc

Sometimes the packaging is rather nice too.

Sometimes the packaging is rather nice too.

I may have mentioned earlier that I'm embarking on a love affair with higher quality audio. One symptom of this is the huge pile of music CDs that I've brought down from the loft to re-rip in a loss-less format. Another is that I'm trying to buy my new music in higher quality than the average digital download fare. 

I wanted a proper copy of Oooh La La by the Crash Test Dummies.  Turned out that there was pretty much no way to buy an uncompressed file. But I can get the actual physical disk, including rather nice packaging and a booklet from Amazon for just over a fiver. What's more, Amazon have this "auto-rip" feature where you automatically get a digital copy of any physical media that you purchase from them. So I get an mp3 file and a proper copy for less than the price of a digital download from iTunes. Delivered for free the next day. Which struck me as a really good deal. So I bought a copy.

And then I found out that Amazon have applied the auto-rip thing to all of my past purchases as well. I seem to have digital copies of disks that I've bought and given away as presents, which puts me in a rather strange place, copyright wise. 

Anyhoo, if you are buying music I can recommend taking a look at physical purchase of media. It is often cheaper and you have a route to higher quality sounds. Even if you end up ripping the disk and then putting it with the others in the loft....

Last Holiday Day

We didn't build this tiny Stonehenge, but we rather wish we had

We didn't build this tiny Stonehenge, but we rather wish we had

This is the last day of this part of our holiday. Tomorrow we head back to Hull and real life. We stayed in Swansea at an amazing guest house and had a really good time. We were revisiting places that we last went to over 20 years ago and seeing what, if anything, had changed.

Quite a few things were different, but the lovely scenery is still there and the weather was very kind to us. 

Dr. Who in Cardiff

Peter Capaldi doing the signing thing...

Peter Capaldi doing the signing thing...

..we interrupt this holiday sequence with a Dr. Who report. You may not have noticed this, but there is a new Dr. Who coming. He is being played by the actor Peter Capaldi who is just about a contemporary of mine. I made the mistake of mentioning to number one son that I was only slightly older than Dr. Who. He replied with "What, 300 years?" which didn't put him in my good books.

Anyhoo. Today we stopped off in Cardiff on our holiday travels. On the way through the town to the castle we noticed a bunch of folks waiting by barriers. Some of them were wearing rather familiar clothes. Turned out that the world premier of the first new Dr Who episode was taking place later in the morning and the stars of the show were going to be walking through the town.

So we thought we'd stick around and see what we could see.  Number one son stationed himself close to the barrier, whereas I wandered around seeing what photographs I could get. 

Jenna Coleman explaining stuff

Jenna Coleman explaining stuff

I got some quite good pictures, number one son ended up with better ones, plus he managed to snag Jenna Coleman's autograph, which was nice. 

Turns out daleks don't do autographs

Turns out daleks don't do autographs

Neither do Cybermen..

Neither do Cybermen..

All the other stars of the show were there too and the weather was lovely.  Sometimes you just can't beat being in the right place at the right time..

Galileo Book

If you have just got an Intel Galileo you might find this book interesting. It tells you how to get started with the device and gives a good overview of the Arduino technology on which the Galileo is based.

To be honest, if you are experienced with the Arduino you will probably already know the majority of the content, but I reckon that there is  enough Galileo specific content to make it worth the relatively modest asking price.  It's also kind of useful to have all the content in one place. Each feature of the Galileo is well explained and there is also some useful background on the Intel aspects of the device.

Note that this book is written for a Galileo configured as an Arduino based platform and does not cover the use of the device as part of the Microsoft Internet of Things initiative. 

Building Unified Apps for Phone and Tablet

A while back I was offered a chance to write a guest blog post for the 'Building Apps for Windows' blog. After a bit of thought I decided to write about the business of taking a Windows Phone application and converting it into a Universal app. I used my Wedding Light application as the example and it was great fun to write. I even managed to lever some cheese into the text...

Thanks to Larry and Kraig for turning it into something that makes a lot more sense. You can find it here