25 Nov 2012, 16:09

My 4 years of Android today and Ireland's first Android App

#“My 4 years of Android today and Ireland’s first Android App”

Today is the 4th anniversary of me paying $499 on eBay for a HTC G1, the first Android phone. Whilst some of my tech predictions over the years have been a little off (cough iPad) I couldn’t have got it more right with Android.

When I heard about the Android project mid-2008, it was obvious Google wasn’t going into things half-heartedly. The G1 itself was a mixed bag. Ugly as sin but with a slide-out keyboard that I still love. Android 1.5 was rough but very functional for someone like me who spends their time on Google products like GMail. I still have the G1, running Android 2.3 and waking me up every morning.

The reason I got the G1 was not for pointless bragging rights, it was because we had decided to build an Android App to show-off the LouderVoice API to some Enterprise customers we were trying to land in the mobile space.

I created the spec and wireframes for the App and also figured out what extra features our API would need. The basic idea was “Review Anything Anywhere”. Essentially what Kevin Rose tried to do with Oink several years later. We both failed because no-one wants to do that :-)

Marino Software in Dublin did the App coding for us and we finally launched Ireland’s first Android App in May 2009 for Android 1.6. It never had many users but it was a fantastic tool for showing potential business customers what our system could do.

The same back-end API is now used to power the reviews in the Riverdance Android and iPhone Apps.

Last week I installed the old App again on my HTC Sensation running Android 4.1.2 and whaddyaknow, it still works! Sure the graphics-scaling is horrific on that big screen but you can still browse and submit reviews to our API.

In those 4 years I’ve gone through a HTC G1, HTC Desire and HTC Sensation. I’ve also bought a ZTE Blade and Eken T02 tablet for others. There is no doubt that my next phone will be Android but sadly not HTC, as I insist on my phones having replaceable battery and SD card. At some point next year I’ll get a decent Android Tablet too.

There are two upcoming areas I find exciting in the world of Android:

  1. Ultra-cheap single board Android computers in the style of Raspberry Pi. Most of these are being sold as 1080p media players but they can do a hell of a lot more for very little money. Which feeds into point 2.
  2. Hardware interfaces like IOIO. Once I finish a couple of my fun Raspberry Pi and Arduino projects, I want to do some car projects using IOIO. Rather than your phone/tablet just being for calls/music/GPS in the car, imagine if it was connected to a wide range of sensors and interfaces. Every car on the road acting as a generator of a wide range of interesting IoT data, all location-tagged and uploaded live over a mobile data connection.
We’ve come a long way baby.

20 Nov 2012, 16:56

The Fixer's Manifesto - Spread The Word

#“The Fixer’s Manifesto - Spread The Word”

Just got this from Jane in Sugru. Already printed and on my wall.

It manages to capture everything we should do to replace our dumb generic disposable consumer culture.

More on the site and a PDF too.

01 Nov 2012, 18:17

Sibal's Halloween Eye of Deatttttttttth

#“Sib\u00e9al’s Halloween Eye of Deatttttttttth”

Myself and Sibal put together a really simple but effective spooky eye for Halloween recently. It caused great interest in her school during Halloween dress-up day just before mid-term.

It simply consists of an old ping-pong ball with a hole dremeled into it and large bright red LED inserted into the hole. That’s connected via a resistor and long wires down her arm to her wrist which has a PP9 battery taped to it. That leads to an on-off switch in her hand so she can catch people unaware.

It is genuinely scary in the dark and the bright LED created freaky concentric circles which were missing when we used a smaller duller LED.

httpv://www.youtube.com/watch?v=E3XGo6rl_tc

The main things it made us think of were Terminator, the Daleks and Davros.

Time to start planning next Halloween.

01 Nov 2012, 14:03

The @RaspberryPi Doorbell of Dooooooooommmmmmmm

#“The @RaspberryPi Doorbell of Dooooooooommmmmmmm”

We had some good fun last night with the neighbourhood kids making use of ourDoorbell of Dooooooooommmmmmmm.

I’ve had a bigger doorbell project planned for quite a while but 2 weeks ago decided we should do a simpler Halloween one. Using various bits bought from Sparkfun and Maplin along with a great tutorial from Adafruit (more below), I finally got something we were happy with, working late last week. Then yesterday evening I put it in place on the door. Unfortunately, with all the pulling, taping and general movement, one of the five buttons stopped working. But the other 4 were fine.

The sounds used were pulled from various online sources. Sibal came up with the Mr Burns idea and Oisn thought of the Home Alone one. I used Audacity to clip some of them and ffmpeg to convert some of the YouTube videos to audio. The cheques are in the post :-)

Originally I was going to use Arduino for this but considering a Waveshield for playing audio costs more than a Raspberry Pi, I changed direction. I then thought I’d use the Arduino for the button detection andcommunicateover USB to the RPi but I finally realised I should just use the GPIO pins directly on the RPi itself. My worry about killing it accidentally were unfounded.

The first version was done on a breadboard to make sure I made no mistakes. It worked well. But it was never going to work stuck to a doorframe so I moved to a strip of veroboard and soldered it together. This had a few, ahem, glitches, which took a while to sort out due to my soldering incompetence.

The final setup was really simple:

  1. One button per sound
  2. Each button connected to a GPIO pin on the RPi along with connection to 3.3V and GND on the RPi (pull up resistors there too but apparently not necessary?)
  3. An old 40-core IDE cable from a dead PC used to safely connect the wires from the buttons to the pins on the RPi.
  4. Extremely simple Python code running in a loop on the RPi which checked to see if any of the connected pins were pulled low by the button being pressed.
  5. If so, it made an external call to mplayer to play one of our selected audio clips

The only real change from the Adafruit tutorial was to use mplayer instead of mpg123. This allowed me to use any audio format including WAV, rather than just MP3s. Also some of the instructions are a little redundant with the latest version of Debian on RPi, but they do no harm.

This is the trivial script to set the volume and call the Python script:


#!/bin/bash
amixer cset numid=3 1
nohup ./raspi-audio-button.py > /dev/null 2>&1 &

This is the code, it uses the RPi.GPIO library (the latest version works fine):


#!/usr/bin/env python
from time import sleep
import os
import RPi.GPIO as GPIO
GPIO.setmode(GPIO.BCM)
GPIO.setup(17, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(22, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(23, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(24, GPIO.IN, pull_up_down=GPIO.PUD_UP)
GPIO.setup(25, GPIO.IN, pull_up_down=GPIO.PUD_UP)
while True:
 if ( GPIO.input(22) == False ):
 os.system('mplayer /home/pi/haunted_sounds/Howl.mp3 &')
 sleep(3);
# if ( GPIO.input(17) == False ):
# os.system('mplayer /home/pi/haunted_sounds/HomeAloneCountOf10.mp3 &')
# sleep(3);
 if ( GPIO.input(23) == False ):
 os.system('mplayer /home/pi/haunted_sounds/ReleaseTheHounds.wav &')
 sleep(3);
 if ( GPIO.input(24) == False ):
 os.system('mplayer /home/pi/haunted_sounds/Scream.wav &')
 sleep(3);
 if ( GPIO.input(25) == False ):
 os.system('mplayer /home/pi/haunted_sounds/CastleThunder.wav &')
 sleep(4);

This diagram of the RPi pin-out was invaluable:

Once everything was setup at the door yesterday, we then found that the volume on the Lidl iPod Dock was far too low. I had to put a tiny battery powered speaker outside, taped to the postbox. But even that wasn’t great so I added a Fiio amplifier. Of course then we couldn’t hear it inside, so I split the audio and used one audio device inside and one outside.

I didn’t have time to setup wireless on the RPi so I used a wired network connection. This enabled me to SSH to the RPi from my PC and start the Python program. It also allowed me to remotely change the Home Alone clip to the howl from An American Werewolf in London after it got a bit tiresome, 2 hours later.

I made a video of it all in action but the bloody version of CM10 on my phone corrupted it. To give you a taste of what it was like, I extracted the audio from it. Enjoy:

Changes? Instead of externally calling mplayer, it’d be better to use some sort of audio library that would allow a follow-on button-press to interrupt whatever is playing. Also, approx 75% of kids pressed the top button so the next time we’ll randomise what is played.

Next steps? Well that’d be our Social-Enabled Doorbell. It’ll probably be Christmas before I finish it tho.

 

25 Oct 2012, 11:05

Open Data Ireland's first meetup tonight in Engine Yard

#“Open Data Ireland’s first meetup tonight in Engine Yard”

Great to see this Meetup happen and big props to Eamon and the crew for hosting.If you are interested in getting involved in OpenData in Ireland please attend. Registration is here but the event is free.

Ireland needs to get beyond talking about OpenData and start increasing the number of people actually Opening Up The Data in a big way. The Irish tech community has to lead by example and that means just doing it.

(Apologies to Code For America for the visual knock-off)

There is so much data out there that anyone with even a modicum of technical ability could unleash. The most complicated thing I had to do in geo-coding the Property Price Register was to merge two columns in Excel!

I’m hopefully (the Eircom DSL gods permitting) going to give a short talk remotely from Bandon, long known as “The Silicon Valley on the N71” :-) I’ve a few bits n bobs to describe, some thoughts to share and some ideas I hope others can run with.

Ideally we’ll do the whole thing as a Google+ Live Hangout so anyone can connect in. Sign up for the Hangout here. I’ll post the Live URL if we have success with it. If that falls apart then I’m afraid it’ll just be point-to-point Skype.

 

23 Oct 2012, 08:47

Google Hangouts Extensions point to a richer Google+ Platform future

#“Google Hangouts Extensions point to a richer Google+ Platform future”

Yesterday I read about a delightful project involving LEDs, Arduino, Processing, Node.js, Google+ and Google Hangouts.

I was originally interested due to the Arduino angle but then I realised there was something extremely powerful going on with Google+ Hangouts and had to dig in more.

Have a look at the video first, it’s an extremely cool mashing together of a bunch of things.

httpv://youtu.be/Y1bdxf9tZWw

I’m not sure how the Hangouts Extensions and API announcements passed me by, but they are a really fantastic idea. To quote Google:

The Google+ Hangouts API allows you to develop collaborative apps that run inside of a Google+ Hangout. Hangout apps behave much like normal web apps, but with the addition of the rich, real-time functionality provided by the Hangouts APIs. Apps have the ability to control aspects of the user interface, synchronize data between hangout participants, and respond to various events in the hangout.
So in the video above, it’s a simple LED toggle that anyone on the Hangout can flick. The Google example mentions games but really anything involving user interaction is possible. I think I now understand how Red Bull managed to integrate a Twitter stream with the Live Hangout of Felix Baumgartner!

What else? Live Polls obviously. Did anyone use it to do realtime voting during last night’s presidential debate?The showcase also highlights Slideshare and Pulse News.

Whilst I am extremely impressed by the Hangouts API, it reminded me yet again of the giant hole at the heart of Google+. I’ve said it many times before but Facebook’s approach is still 100% correct. Provide a Platform and APIs and let developers/businesses provide the ideas and innovation. Facebook is a flavour factory, Google+ is currently vanilla only.

But the Hangout API and Extensions give me hope. If that type of wide-open functionality is made available in every part of Google+ (particularly Business and Local Pages), then Facebook has some real competition on its hands. That’s good for both Google and Facebook. And of course, us.

 

23 Oct 2012, 07:59

MIT App Inventor Official Open-Source Release

#“MIT App Inventor Official Open-Source Release”

I’m really pleased to see this release happen. Dec/Jan was an awkward time as Google dropped App Inventor and MIT didn’t have their site ready. MIT has done a sterling job since and it’s great to know that the full up-to-date source code is available. I hope a community of contributors to the codebase now starts building up.

One issue we ran into in our school with accessing the main MIT site and GAE was a lack of bandwidth. When you have 15 laptops all trying to download/upload Java Apps to the internet on a connection that I think is 512kbs, you are going to have problems.

So a private local App Inventor install means we could provision an old PC as an Ubuntu server in the school and serve everything over local wifi. I hope the dev server capabilities are improved beyond “a few users” so we can remove the dependency on Google App Engine and provide a trouble free setup for the kids.

 

20 Oct 2012, 13:45

E is For Electronics, Other Good Kids' Stuff and What's Next?

#“E is For Electronics, Other Good Kids’ Stuff and What’s Next?”

Limor “Ladyada” Fried of Adafruit has put together a really lovely colouring book called E is for Electronics. It has everything from A-is-for-Ampere to Z-is-for-Zener-Diode. You can buy it online for $10 or just print it off using the booklet setting of your printer. I printed one for our 8 y/o daughter and she is a big fan. I’ve just done another copy our 7 y/o son. I’ll order some as stocking fillers too.

Yesterday I also spotted a really neat set of products over on Sparkfun. They are paper projects like greeting cards and mini “night-lights” that use a conductive pen for the wiring. I’m going to order one today but in the meantime, I have downloaded the PDFs and will do a rough version of the night-light using wire and bits I already have.

This whole idea of Open Source hardware and designs really has me excited. Back in 1994 I built my first ever GCC cross-compiler and compiled an Open Source RTOS. In 1995 I installed Slackware Linux for the first time. That’s when I knew that everything in software was going to change forever. It’s exactly how I feel about hardware and electronics now. In fact, it’s fun to realise I have sort of come full circle in 30 years:

ZX Spectrum -> Electronics in College -> Embedded Software -> The Internet -> The Social Web -> Arduino+RaspberryPi -> The Internet of Things -> ????

So what is “????”? I think is IoT+Social. Everything and everyone network-connected, with all that data being crunched and used real-time, in ways we can’t even guess at yet.

I’ve always loved Mark Zuckerberg’s description of Facebook as “A Social Utility”. I don’t think FB is anywhere near that yet, but one of the big guys like them is going to have to be the enabler, if Social IoT is to work.

Meanwhile I have some spooky eyeballs to make for my daughters for trick-or-treat using LEDs and push-buttons.

 

16 Oct 2012, 15:02

Playing 1980s games on your Raspberry Pi and remembering Mike Singleton

#“Playing 1980s games on your Raspberry Pi and remembering Mike Singleton”

This post was going to be just an up-to-date summary of many other articles out there on this subject. With the rapid rate of change in the RPi world, even very recent guides have proven to be unusable quite quickly.

However I’d first like to remember Mike Singleton who died last week. I didn’t know his name until today when I read this lovely piece about him. But what I did know about was Lords of Midnight and Doomdark’s Revenge. Those two adventure games dominated that category on the ZX Spectrum in the mid-80s. Mike was still creating new games until very recently. It’s just another reminder of how important the 1980s UK home computer scene has been to the current gaming industry. In memory of Mike, I’m playing Lords of Midnight from the start again this evening on the Raspberry Pi. RIP.

The Raspberry Pi makes a brilliant base for old-school game emulation, just as it does for XBMC. You literally just need it, a USB joystick, maybe a wireless dongle, a TV and you are in business. I’ve been very tempted to double-sided-sticky-tape one to the side of the TV without a case, it’s that small. I’m currently using an ancient 14” Philips portable CRT to get the full retro effect, including blinding flickering.

Atari 2600

OK, I have to admit my rose-tinted spectacle were on overdrive here. The Atari 2600 Pacman in my head was actually thearcadeversion. The real thing is pretty awful. This console was a bit before my time and the main thing I remember about it were the completely unusable joysticks. But if you want to re-live that horror, then it’s really very simple.

Grab all the Atari 2600 ROMs from one of many sites. They are tiny so the download takes no time at all.

Then install the Stella emulator:

sudo apt-get install stella
Then just run stella inside X Windows. More details here.

MAME Arcade

MAME seems to have been around forever. It enables you to play old arcade games on a wide variety of machines. I remember using it on my brother-in-law’s Atari 520ST in the 90s.

So it’s no surprise it works well on the Raspberry Pi. Compiling from source apparently takes forever and some of the binaries from this summer don’t work on the latest Debian release. Howeverthis latest compiled version of Advance MAME by Shea Silverman runs perfectly on the latest Debian.

Download it to your home directory, then


unzip mameBin.zip
sudo chmod 777 /dev/fb0

Put your roms into ~/mame/share/advance/rom/

cd mame/bin/
./advmame

Edit the config file
nano ~/.advance/advmame.rc
to include the proper display configuration

For HDMI try:

device_video_clock 5 - 50 / 15.62 / 50 ; 5 - 50 / 15.73 / 60
For NTSC TVs try:
device_video_clock 5 - 50 / 15.73 / 60
For Composite PAL TVs:
device_video_clock 5 - 50 / 15.62 / 50 ; 5 - 50 / 15.73 / 60
Then run MAME with the name of the game e.g. pacman or zaxxon.

I’ll leave it as an exercise for the reader to source their own legal ROMs.


 cd mame/bin/
./advmame gamename

ZX Spectrum

Installing the Fuse emulator is now trivial to do:
sudo apt-get install fuse-emulator-common fuse-emulator-utils spectrum-roms
Then grab your favourite games from World of Spectrum and run fuse inside X Windows. More details here. And Lords of Midnight here.

There are ton of other emulators out there, at various levels of usability. Our eldest has already been asking about SNES.

 

09 Oct 2012, 10:09

ClassicMap - Google Map overlays on Apple Maps in iOS 6

#“ClassicMap - Google Map overlays on Apple Maps in iOS 6”

Oh look, Rosscarbery has a lagoon again.

GitHub Page

App Store.