If you haven’t already, you should order a Raspberry Pi right away! (Then come back and read this, of course!).
Note: Click any Image for a full-resolution version. I’ve done a YouTube video which can be found here also.
For such a small and low-cost device, it has so much to offer! The Raspberry Pi is a small, bare-bones computer designed for kids to learn programming at home and in school without the need for expensive equipment – let’s face it, a £30 computer that you (or your kids) can play with, learn from, and enjoy without worrying too much about it getting broken or damaged like you would with a laptop or desktop computer!
I got my first Raspberry Pi (or Raspi/RPi, for short) around one month ago (Model B, Rev 2 – 512Mb), and haven’t put it down since! After a bit of playing and browsing the web (Yes, on the Pi!), I’ve been working to get it to interface with my Arduino Uno (Rev 3) for various projects.
Arduino Uno (Revision 3)
Logic-Level Converter for I2C, from Sparkfun
I have the two devices connected by I2C using a simple Logic-Level Converter to compensate for the voltage difference between the two boards. In the image to the right you can see where I soldered two Right-Angle Pin strips (6 per side, totaling 12 pins on the LLC board) to be used for connections between the devices.
Warning: Don’t try and connect the devices without some form of voltage regulation – the Arduino’s logic high is 5v whereas the Raspberry Pi uses 3.3v (or 3v3, as it is often written); Connecting the devices directly will almost certainly damage the Pi’s Processor (and we don’t want that, do we?!).
Below you can see the connection between the two devices.
Pins used on the Raspberry Pi: 1 (3v3), 3 (SDA), 5 (SCL), 6 (GND)
Pins used on the Arduino: 5v, SDA, SCL, GND
Raspberry Pi and Arduino with I2C hookup
Can’t See the Video? Check it out the related video over on my YouTube channel, here!
Note: The Vin pin on the Arduino is unregulated, and will give whatever input voltage is being passed to the arduino (so if you’re running on a 7v PSU, the Vin pin will give 7v); be careful not to accidentally use this pin as you will almost certainly fry something!