A Rather Useful Slice of Raspberry Pi

DSC03421_2_3.jpg

This is a slightly processed picture of the audience. It seems that quite a few people have a taste for Pi.

We did another Rather Useful Seminar today. It was all about the Raspberry Pi. I covered what is, how you use it, a bit about hardware interfacing from Python and then we had a bit of time to look at my Pi Arcade table, which I’m keeping in the department for now.

DSC03425.jpg

This is the table, showing off its Pi credentials. Normally I run Mame on it. You can find out more about how I built it here.

Thanks to a great audience. You can find the slides here.

Wrestling with Python

image

I’m only a bit sorry about the title. And the fact that the first program that we wrote was an “adder”. And yes, I do know that the language was named in honour of the TV show, not the snake.

Anyhoo, we had our first Python session for teachers tonight. A great bunch of folks turned up, wrote some Python, made it work and went home. If you are interested to find out what we got up to, you can find the slides and the lab notes here.

It’s not too late to sign up. If you are a teacher in the Hull area who would like to learn more about Python and has Tuesday evenings free then you can find out more here.

Stand Well Back–Three Thing Game is Launching….

IMG_5139-Edit.jpg

Students and Things of Old.

The World’s Premier Student Game Programming Competition involving Three Things is now ready for launching. We are going to have all the usual shenanigans with a Thing Auction next week (on Monday 28th at 2:15 in Wilberforce Lecture Theatre 2 since you asked) and more fun and games than you could shake a stick at. Even if you were a really good stick shaker.

If you want to enter (and you should) print out and fill in a registration form (which you can find here) and bring it to me along with your registration fee (which helps pay for the pizza).  You can even suggest a thing which you might like to bid for on the registration form. Teams of up 4 can take part. Team members don't have to be Computer Science students, but they do have to be University of Hull students.

If you’ve never written a game before I’ll be doing a Rather Useful Seminar next week (on Wednesday 30th at 1:15 in Robert Blackburn Building LTD since you asked again) which will describe how to get started with game writing in C#. Don't worry if you are just learning to program. It turns out that spending a solid day working on a project is a very good way to build your skills. This is true whether or not you want to end up as a game developer.

We will start at 7:00 pm on the Friday night (1st November) and finish by 8:00 pm on Saturday evening (2nd November). So you can spend all day Sunday recovering. We even have some proper game developers coming along to join in the fun .

If you don't have a team, don't worry. We will be using the "Team-o-matic" to create teams for individuals who haven't got one. Just fill in a form for yourself and write "Team-o-matic" as the team name.

John Mayer at the O2–thanks to Hacked

In July this year I took part in Hacked at the O2 in London. It was an absolutely brilliant hackathon, made all the better by the fact that I managed to win one of the competitions. My Difficultifier got People’s Choice Award, which was completely wonderful. What made it even better was finding out that part of the prize was four tickets to any show at the O2 Dome over the next year. Splendid.

I mentioned this to Number One daughter. “John Mayer’s playing the dome in October” she said. Done.

So, thanks to those wonderful O2 people, particularly Cristiano Betta and Kevin Prince, today we were sitting in seats up close to the stage, having just come from the O2 Lounge where we had been preparing for the performance with a couple of cocktails. As you do (or as had been laid on for us)

DSC03250.jpg

This is Gabrielle Aplin, who did a sterling job providing support and had an absolutely cracking backing band.

DSC03381.jpg

.. and this is the man himself, with some good advice for us all. He started early and gave us a two hour demonstration of why he is just so darned good. If you’ve not heard of John Mayer, then seek him out. Blues, rock, country, playing the guitar behind your back.  The works.  Just really, really good.

A Trip to London

WP_20131019_16_28_05_Pro__highres.jpg

This is the fancy new roof over the courtyard of the British Museum. We’re here because we are having a couple of days in London and fancied seeing all the good stuff that our enterprising ancestors plundered from ancient civilisations far and wide.

WP_20131019_16_22_16_Pro__highres.jpg

I think that this is a very early prototype for the very first Simpsons episode. But I may be wrong.

We were looking at the mosaics and noting that the resolution was reasonable, but the frame rate seemed a bit slow. Great fun and probably even cultural.

Winning Prizes with Tags of Fun

design

I’ve decided to use the Tags of Fun at our 5:15 Friday lectures. Today I took along the latest incarnation, housed in an attractively designed black and white box that is just a bit too small to hold the batteries properly.

But it worked fine. Everyone who had hung on to their tags from the welcome party was able to sign in and win prizes, in this case plastic owls and some nougat from the fair. And most of the names were right too, which was nice.

I’m going to refine the design, week on week, to expand what the reader does, and maybe make a second one that will make signing up for prizes even easier.

Above you can see the Gadgeteer configuration of the device. The printer is plugged in when I need to make labels for tags, the Bluetooth lets the device talk to my Windows Phone. By Christmas it should be an amazing system. But that might be Christmas 2020……

All the Fun of Hull Fair 2013

IMG_7840_1_2.jpg

Hull Fair is in town. We didn’t manage to make it last year, what with one thing and another and horrible weather. Today though we thought we’d go for it. I took the big camera and cunningly concealed it underneath my jacket, so that I looked like any other heavily pregnant middle aged tall bloke.

We just went on the big wheel to take pictures and then on Hook a Duck to win a teddy. Then we bought some nougat and headed off for a pie at Fudge just down the road.

IMG_7995.jpg

Indeed.

Printing the Weather Forecast in 3D

DSC02977.jpg

We had a good audience for the first Rather Useful Seminar. Some of them were fresh from a first year lecture and must have been feeling a mite peckish. But they stayed to the end and I hope they enjoyed it. The talk was very similar to the one I did last year, but there was a twist at the end, when I printed the weather forecast as a plastic object. Again, I brought along Una the Ultimaker, and again she behaved herself very well.

I’ve become quite intrigued with the idea of generating objects from software, and it occurred to me that with the FreeCad tool having a Python interpreter in it, we should be able to do something interesting. I’d no idea how to use Python to read a weather forecast but fortunately Catalin George Festila has done it here. So I took his methods which use the Yahoo weather feed and prints it out and made a few changes.

def weather_for_zip(zip_code):
    url = wurl % zip_code +'&u=c'
    dom = minidom.parse(urllib.urlopen(url))
    forecasts = []
    for node in dom.getElementsByTagNameNS(wser, 'forecast'):
        forecasts.append({
            'date': node.getAttribute('date'),
            'low': node.getAttribute('low'),
            'high': node.getAttribute('high'),
            'condition': node.getAttribute('text')
        })
    ycondition = dom.getElementsByTagNameNS(wser, 'condition')[0]
    return {
        'current_condition': ycondition.getAttribute('text'),
        'current_temp': ycondition.getAttribute('temp'),
        'forecasts': forecasts ,
        'title': dom.getElementsByTagName('title')[0].firstChild.data
    }

This is the code that he wrote that fetches the weather information from the Yahoo weather service and creates a list of objects that contain a forecast item for five days. The forecast information contains the highest temperature for each day, and that’s what I’m going to use to control the height of each of the columns that I print.

def main():
    a=weather_for_zip("UKXX0476")
    noOfReadings=5
    # find range of temperatures
    highest = float(a['forecasts'][0]['high'])
    lowest = highest
    for i in range(noOfReadings):
        v = float(a['forecasts'][i]['high'])
        if highest < v:
            highest = v
        if lowest > v:
            lowest = v
    # make some blocks 
    plinthThickness = 3.0  
    blockWidth=5.0
    blockDepth=5.0
    blockStartHeight = 5.0
    heightRange = 20.0
    rangeScale = heightRange / (highest - lowest)
    x=0.0
    y=0.0
    plinth = Part.makeBox(blockWidth*noOfReadings,blockDepth, \
        plinthThickness, Base.Vector(0,0,-plinthThickness))
    for i in range(noOfReadings):
        v = float(a['forecasts'][i]['high'])
        blockHeight = blockStartHeight + rangeScale * (v - lowest)
        block = Part.makeBox(blockWidth,blockDepth, \
            blockHeight, Base.Vector(x,y,0))
        plinth = plinth.fuse(block)
        x = x + blockWidth

    Part.show(plinth)
    Gui.SendMsgToActiveView("ViewFit")
    Gui.activeDocument().activeView().viewAxometric()

main()

The Yahoo zip code for Hull in the UK is UKXX0476. This code fetches the weather forecast data and then finds the largest and smallest temperature values (something which should be familiar to first year students). It then makes a row of five blocks, each of which has a height set by the temperature for that day. I’ve re-written it from the demonstrated code so that the coordinates make a bit more sense. The width and depth values map onto the x and y directions, with height being the z value. The code creates a little plinth and fuses a series of blocks onto the plinth. The length of each block is the temperature for that day.

forecast

 

This is the object that was produced by FreeCad. It represents the temperatures 12, 16,14, 17 and 16 degrees, which is the rather chilly forecast for the next few days. I sliced the design using Cura and then, after a bit of kerfuffle I managed to print out the temperature plot.

DSC02989.jpg

The weather forecast. And a tiny owl.
I printed it out really tiny (all of the dimension values above are in mm) but I reckon it came out quite well. I’ve since found a flaw though, in that you can’t tell which way round it is supposed to be read. Of course I could add an arrow or emboss some text to make it easier to use.

I must admit that I can’t see a huge demand for physical manifestations of the weather forecast, but I hope it brought home to folks how easy it is to grab information and turn it into something tangible. There is a lot of scope for random patterns and generating objects from mathematical formulae. And, as you can see above, it is very easy to do. I made an offer that if anyone uses Python to make an interesting object I’d be quite happy to print it out for them.

You can find the slide deck here. At the end Peter was kind enough to show some videos of his printer in action. You can find out all about the “Richmond” 3D printer at his blog here.

3,000 Followers on Twitter. Sometimes.

image

I’m pleased (and a bit surprised) to find that I now have over 3,000 followers on Twitter. I’ve been close to the magic number for a while now, but it seems that there have been a bit of un-following going on where I’m concerned (or perhaps some Twitter spam-bots have been shut down). All I can say is that this has caused my numbers to bounce around the magic figure for a few days, but now I really can say that I’ve made it past the magic number.

I wonder if I should tweet about it?

Time Travel with Windows Phone

Untitled

Apparently there are people who will believe that a software upgrade will make your phone waterproof. The “Preview for Developers” application for Windows Phone doesn’t actually turn your phone into a Tardis, but it does allow it download future versions of the Windows Phone operating system for testing. That way you can make your applications work with the latest versions of Windows Phone before they are released to the general public. It also means that you can use upcoming new features like Drive mode and application management.

Untitled

You can now terminate applications from the the App-Management screen (hold down the Back key to open this). Although why anyone would want to terminate the wonderful VoiceMusic application is a mystery to me.

Improving your University Timetable

image

This year the university is making available an electronic version of the timetable for all staff and students. It is best described as “a work in progress” because that is what it is. Lots of wonderful things are promised for the future, including Outlook integration and proper, personalised timetables. But for now it is a bit unwieldy to use.

Which is not good enough for Tom, one of our students, who has built a Python program that reads the data and then lets you display your timetable and do all the things that you’d really want to do with it. You can find out about it here.

Incidentally, I found his blog post via http://hullcompsciblogs.com/

This has a bunch of good student blogs, and if you are from Hull and starting blogging you can ask them to add yours to the syndication.

Saturday Open Day

DSC02964.jpg

First sitting

DSC02973.jpg

Second sitting

Up until now we’ve been very lucky with the weather for our open days. Not so today. The weather dial has flipped over to “horrible” and seems to be stuck there. However, we did have quite a few brave souls who made it through the wind and wet to come along to see us. I did a couple of presentations and showed off my Cubelets And why not.

Thanks to both bunch of folks for being great audiences, laughing at my jokes and even going “Wooo” when I uttered the immortal words “robmiles.com”.

Adobe Creative Cloud for Academics

image

If you are thinking of spending some money on a new camera, then welcome to the club. I’m always thinking of spending some money on a new camera. But before you buy a camera you might want to think about investing in some software to make the best of the camera you already have.

I’m a big fan of Photoshop Lightroom as a way of getting pictures out of the camera, tweaking them a bit and then managing where they are stored. It also has very good integration with Photoshop itself, along with lots of other plugins that can do lovely things with your pictures (for example Photomatix Pro for High Dynamic Range work).

Some time ago (in fact around a month and a day before a new version came out) I bought a copy of Photoshop. I’m proud to be able to say that I know what nearly a quarter of the buttons do now. But I really want the newest version, because that works best with the RAW files (images direct from the sensor) that my cameras produce.

Now you can’t really buy Photoshop any more. Instead you rent it by the month. Up until now I’ve not been that keen on that model, I much prefer owning things. However, in a world where (no – this is not  a movie trailer) new versions of cameras and software come out at least once a year, renting makes quite good sense. Particularly as they have a deal at the moment where students and academics can get pretty much all of Adobe software for around fifteen pounds a month by signing up for a Creative Cloud subscription.

People spend more than that on cigarettes, and for your money you get access to the latest versions of Photoshop, Illustrator, Acrobat Pro, Dreamweaver and lots of other things that would probably be useful if I knew what they did. The offer is open until the 27th of October. Well worth a look.

Nokia Glance Background Pictures

DSC02959.jpg 

One of the many nice things about having a Nokia phone is that it provides “glance” content. This is stuff that appears on the screen when the phone is locked. The display is not very bright and seems to have a negligible effect on battery life, but it does add a lot of value. Currently the glance content is just the time and the charge status, but hopefully over time it will extend to include missed calls and alarms, and maybe even calendar details.

However, right out of the blue, Nokia have released a beta version of a program that lets you put pictures on your glance screen. The application ships with a few pre-set pictures, including the rather nice tiger above, but you can also process your own and add them to the four that cycle round. If you have a Nokia phone that is running the GDR 2 release (this is being rolled out at the moment) then you really should grab a copy and have a play it really is rather neat. You can get the program here.

3D Printing Fun at C4di

3DPrint (2 of 3)-Edit.jpg

Well, that was fun. Peter, David, Helen, Paul and myself all got together to talk about 3D printing and scanning at C4di. I took along Una, my Ultimaker printer, David, Helen and Paul took along their 3D scanner and MakerBot printer and Peter showed off his “Richmond” printer.

Within no time the place was full of the smell of hot plastic and the sound of machines whirring away. We had a huge audience (in that there were lots of people, not that they were giants) and they seemed to really enjoy finding out about 3D printing. I started things rolling, with a quick zoom through my presentation about how I got into making things and then Peter followed up with a talk about how he came to design and build his own 3D printer from scratch. As you do.

Finally David rounded off with a description of how 3D printing and scanning technology is being used in his business and how it will undoubtedly develop in the future. Helen and Paul were showing off their modelling and scanning skills and the whole thing ended with lots of happy people wandering round, taking a look at the technology and getting to grips with it. Without getting their hands burned.

Thanks to Jon Moss for setting up the session and C4di for hosting it.

Postgrad Party Fun

DSC02919.jpg

We had our Postgraduate Welcome party today. Some of the same attractions as lst week’s Undergraduate paty, including the Occulus Rift, which I had a go with and turns out to be great fun.  We had the racing cars. And some of the same quiz questions.

DSC02925.jpg

These folks came first and were very pleased with their prize. As they should be.

DSC02929.jpg

These are the folks that came second.

DSC02931.jpg

And this is the “Malteaser” team who came third. But they did get two boxes…

My favourite question from the quiz was this:

image

Any ideas?

Goldfrapp –Tales of Us

image

I used to like buying old style vinyl records. There was something rather nice about going into the record store and coming out with a  twelve inch slab of plastic in a large sleeve. Of course that’s not how we consume our music these days.

I got this album for “free” because I’ve got my phone tied in with the Xbox Music “All you can eat for ten pounds a month” deal. Nothing physical moved anywhere. And I haven’t got a nice album sleeve to look at. But the music is splendid.

I’ve always liked Goldfrapp. No two of their records sound the same. If you like ambient, tuneful, stuff you’ll love it.

Hornsea Mere on Sunday

IMG_7576_7_8.jpg

After lunch the weather was lovely, so we thought it might be nice to go out to Hornsea Mere for a walk and take some photographs. So we did.

New students, if you are looking for a nice place to go with mum and dad when they drop round to see you, then I can recommend it. The coffee shop has had an overhaul and does a really nice line in scones and cream. It is around 25 minutes from Cottingham, you can feed the ducks and then go and have a look at the seaside.

IMG_7546_7_8.jpg

You can even hire a boat and splash about a bit.

Breaking Games

DSC02902.jpg

When number one wife (she calls me “husband zero”) got her iPhone a while back one of the first things we got for it was Scrabble. The implementation was slick and it worked a treat. She played a lot.

She doesn’t play as much now. Not because her word powers have diminished, but because the game has “upgraded” itself to the point where it has become a pain to play. Before she can fire up a quick game of digital word wrangling she now has to fight past loads of login screens offering a chance for her to take on players from all over the world. She doesn’t want to do that. She wants to do what she has always done, which is play a quick game of Scrabble against the computer.

I hate it when things upgrade themselves to the point of uselessness. The game also acquired a cheery little sidekick who would tell you after each move the one you should have made and how many points you have lost as a result of not being as clever as it is. This turns out not to be particularly motivating. We managed to turn that off. And avoid all the different new board and tile designs which are now available (and will be for sale soon I have no doubt).

But as for the forced login, that one I’ve been unable to get rid of. The menu system seems to be designed to make you feel unsociable and isolationist, just because you want a quiet game of Scrabble. Ugh.

Learning from My Mistakes

DSC02905.jpg

Today was the first foray into the labs with the new First Year group. A splendid bunch of folks. Last year I blogged about the sneaky thing we did with the sample program. It worked so well that we did it again this year. But of course there is always something more….

At the end of the lab we have a silly test, with one or two sensible questions. It’s there get everyone used to the test environment and it works quite well. One sensible question asks you to identify the problem that broke the program. It’s a multiple choice question with lots of stupid possibilities, along with the answer “The program used a multiply operator instead of divide". Actually the mistake is that it used a multiply operator instead of a plus. It was originally a genuine mistake. But I’ve left it in because it us actually quite useful.

Quite a few people spotted this mistake in the question and came and told us about it. One or two didn’t bother because they assumed the knew what we meant. Please don’t ever do this. If you find what looks like a mistake in something to do with the course, and you just assume you know what has happened you might be heading for trouble. Please, please, please let us know if you see anything that looks wrong in stuff that we give you.

To refer to the post on Wednesday, we do an awful lot of planning. Because it is crucial. But we also know that stuff happens that we don’t think of, which can break our careful plans. So we need to be told if something might not be right so that we can fix it if required.

Oh, and thanks to all the students who turned up and worked hard. Everyone I saw was chugging through the exercises very nicely. The real teaching starts next week. It’s going to be fun..