Raspberry Pi Arduino Buffer

From Nottinghack Wiki
Revision as of 12:57, 13 July 2012 by Msemtd (talk | contribs)
Jump to navigation Jump to search

An Arduino interface to save the precious Raspberry Pi from the outside world.

The presence of GPIO on the Raspberry Pi opens up the world of physical computing to a new audience of hobbyist programmers and this can only be a good thing. I ran a few simple GPIO tests with the pi and I have to say I was truly scared that I would damage it! The GPIO is rather "raw" and the pins have no protection. Just fitting a plain cable to the 26 pin header with nothing attached, I am quite able to cause hangs and crashes! This is with a Wheezy beta distribution and things may improve with time.

It seems to me that I would need to build a protection board for the Pi...

And then I'd have to rewrite all my perfectly functional Arduino sketches to run on the pi...

And then I'd have to adapt all my sensors to work with 3.3v logic...

And then I'd need to find an analogue to digital converter for my analogue inputs...

And then I'd no doubt run out of Digital pins...

And then I'd want to use digital inputs with interrupts...

So, why not just use an Arduino and talk to it over the Pi UART? An ATMega328P is about £3.50 and I don't care too much if I blow one up. If I blow up my Pi it will be months before I can get my hands on another!

OK, so I'm convinced: I'll build an Arduino clone that plugs into the Raspberry Pi.

This first one uses a Ciseco Slice of Pi -- I was feeling lazy and didn't want to spend too much time looking for bits and besides, there were loads of them in the vending machine at the Hackspace for just £4 so it's a no-brainer!

The proto board is just big enough for the 28 pin DIP - I desoldered a couple of 16 pin DIP sockets from an old prototype board found at the hackspace. This leaves me with 4 spare socket pins at one end which I'll no doubt use in the future.


Tested distribution: 2012-06-18-wheezy-beta (http://downloads.raspberrypi.org/images/debian/7/2012-06-18-wheezy-beta.zip)

Soon to test raspbian