With hundreds of Arduino shields available for any imaginable application, it’s a shame they can’t be used with the Raspberry Pi. Breaking out the Raspi GPIO pins to Arduino-compatible headers would allow makers and tinkerers to reuse their shields with a far more capable computing platform.
The folks over at Cooking Hacks realized a Raspi to Arduino shield bridge would be an awesome device, so they made their own, complete with a software library that allows you to port your Arduino code directly to the Raspberry Pi.
There are a few limitations with the Raspberry Pi’s GPIO headers; the Raspi doesn’t have analog inputs, so the Cooking Hacks team added an 8-channel ADC. Along with analog inputs and the headers required to pop a shield on the board, there’s also a socket for an XBee module.
The software library contains most of the general Arduino functions such as digitalWrite() and digitalRead(). There Serial, Wire, and SPI libraries are also implemented, allowing any device that communicates through UART, I2C, or SPI to talk directly to the Raspberry Pi.
While the Raspi Arduino bridge doesn’t allow for PWM in the same capacity as an Arduino, you’re always welcome to whip up a servo or LED shield for this neat little adapter.