My adventures with a Raspberry Pi and Arduino programming

Raspberry Ralph

Santa is bringing me a Raspberry Pi Model B and Gertduino board for Christmas! What to do with them though…

The question is, what shall my first project be?

Aircraft Tracking

Being an Air Cadet instructor I’ve wanted to do this for a while. Using a standard Digital TV (DVB-T) receiver monitoring the 1090 MHz frequency you can track aircraft!

Modern aircraft output their identifier, position, altitude, heading and other information live using this frequency. With a DVB-T dongle and a computer you can track aircraft up to 30 miles away!

Pretty cool. Definitely going to do this first. I’ll add this information to a MarkLogic database on my Mac too that I use for work (at MarkLogic where I’m a pre-sales Engineer. See here for my work blog.).

This will give me a quick way to search and visualise historical track of aircraft. I’ll then extend this to provide a live feed of aircraft positions in an area of interest. (i.e. near me)

Artificial Intelligence

I want to relearn a few basics of AI. Mainly to refresh my old university knowledge (now 12 years ago!) and partly because I want to turn my Raspberry Pi into a robot. Called Ralph.

Ralph the Raspberry Pi Robot. Hence the blog title!

I’ve got to start somewhere though, so I’ll start training a neural net on whether an aircraft is expected. Inputs being day of week, time segment of day (15 minute segments), and whether an aircraft is nearby.

I’ll use the historical information in MarkLogic as training data.

I’ll then compare this expected AI result in the current time segment, to the observed results. (Is there an aircraft in range now? – from the sensor).

This gives me a way to start comparing expected environmental factors to observed ones, and performing an action when there’s a mismatch. E.g. Ralph will tweet ‘I was expecting an aircraft at 14:45-15:00, but I’m instead all alone!’

I’ll be using pybrain for this I think, as it’s easy to learn and has the concepts of Environments and reinforced learning built in.


I’ll then look at using basic AI algorithms along with Arduino taught actions (Go forward, go back, turn left, turn right) to get Ralph to learn his environment. Should be a good project to get used to Arduino programming with inputs and outputs, servos, motors etc.

Not sure how Ralph will know his position yet though. GPS will be too inaccurate indoors. Hmmm…

I’ll probably expand this to include a fixed charger station. Ralph can then explore and come home when finished. All this is doable in pybrain.


This should keep me busy for the first six months. Thanks Santa!!!


Comments on: "Raspberry Ralph" (3)

  1. […] (Gertboard Atmel), some in the Pi (Python for AI) and some in Node.js (sending data to MarkLogic – E.g. flight data. Also retrieving some […]

  2. I’m excited to see what you manage to build, but I’m having difficulty seeing the big picture. It would be great to see some sort of diagram showing individual components as you envision them and their relationships. (both software and hardware) And what is the “rover” component? Are you using some kit or building it from scratch?

  3. Hi Vitaly. Thanks for your comment. I’ve literally made no decisions yet, other than using a Raspberry Pi as the main board, a Gertboard as the IO board and motor controller. Just decided not to use ROS due to its complexity of getting it to work on the Raspberry Pi. Going to do something that is compatible with ROS via the rosbridge API in Node.js though. Best of both worlds then.
    I’ll be sure to post component diagrams as I get going.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: