April 29, 2015

Easily interface an Arduino with a Raspberry Pi

Although the Raspberry Pi is a great single-board computer and a lot can be accomplished with it, there are some instances where an Arduino or compatible board may be preferable, as they offer an inexpensive method of interfacing with a wide variety of hardware. However when you combine the two, the features of both units can be harnessed for more detailed projects.

One method of connecting the two has been demonstrated by Instructables member patsquare, whose project is a Raspberry Pi controlling a LCD via an Arduino. The method of connection is via the Arduino's USB port, which offers an easy way to send serial data between the two boards without needing level shifters etc. Example code has been provided in python for the Pi and of course the Arduino sketch, and is a neat framework for Pi to Arduino control. A quick demonstration of the project is shown in the following video:

For more information please visit the project's Instructable page. And for more, we're on facebookGoogle+, and twitter - so follow us for news and product updates as well.

For more complex Raspberry Pi projects that require interaction between an Arduino and a Raspberry Pi for enhanced hardwre control you can save time and space by using our new PiLeven board:

The PiLeven is an Arduino-compatible board based on the Arduino Uno, but with a few changes. Obviously it's a bit of a strange shape! The PiLeven fits right on top of a Raspberry Pi (either model B or B+) using the Raspberry Pi expansion headers.

The PiLeven also has a high-current switchmode power supply, so you can plug in anything from 7V to 18Vdc using the standard 2.1mm jack. The PiLeven can power the Raspberry Pi, so you don't need a regulated 5V USB connection anymore.

Serial communications on the PiLeven is linked through to the Raspberry Pi, so your Pi can upload new sketches straight to the PiLeven or send/receive data and commands. We've included level shifters so the 3.3V Pi can talk safely to the 5V PiLeven. And you can plug standard Arduino shields right into the PiLeven, giving your Raspberry Pi access to the huge range of shields already available. For more information about the PiLeven, including our tutorials - and to order yours today, visit the PiLeven webpage.

Leave a comment

Comments have to be approved before showing up.