What You Can Do When A Raspberry Pi Teams Up With An Arduino

We thought that connecting an Arduino to a Raspberry Pi was overkill, but one thing caught our attention. [Jan Stevens] mentions that the RPi is less expensive than the Ethernet Shield. Interesting. As we looked into his writeup a bit more we began to think he’s onto something. [Jan] uses the PHP serial class to communicate between the RPi and Arduino¬†(dead link; Internet Archive). This ends up being a very inexpensive way to bring some of the more powerful web programming options to your hardware devices.

Sure, he’s just driving three RGB LEDs. But the demo video after the break gives us a glimpse as some of the interface options that become available when an embedded Linux machine is in play. He’s using jQuery, AJAX, PHP, and JSON to name a few. If you want to give this a try yourself you can grab the code from his Github repo. Of course we’re going to want to hear about any projects you develop from this starting point!


16 thoughts on “What You Can Do When A Raspberry Pi Teams Up With An Arduino

      1. It is not because it has video out that the RPi is a useable computer…

        And you can put OpenWRT on the TP-Link WR703N, so you get bleeding-edge package updates with opkg, too.

        For its low $23 price, the TP-Link WR703N has built-in 802.11n Wifi + working USB 2.0 port with the ability to drive a 3G dongle with 200/300 mA avg. and 2A peak current. So yes, it has a real, good efficient switching mode power supply vs. a cheap LDO heat radiator!

        Also it’s 1/2 size compared to RPi.

  1. I plan on using my pi to trip an optically isolated relay board made for arduino projects. Turning the lights on and off with a 6$ relay board rather than using an arduino board and I can control mains power with it instead of LED’s.

  2. I dunno… I get using a pi rather than an ethernet shield because it’s lest expensive. But.. once you have all the power of the raspberry then what is the point of the Arduino? Is it the pwm output? Is that a problem for the raspberry pi? If so can it be done with an i2c gpio chip?

    1. The Arduino has analog I/o pins, and each pin can handle way more current than the Pi GPIO. You can’t directly drive a relay with Pi pins. The Arduino is more limited in memory, but at least it is real time.

      These two devices together at far less overkill/redundant than people make it out to be. All depends on your goals.

      There’s a world of difference between Arduino Sketches and Python. I love Python, but Processing/Sketch has a big head start in terms of libraries.

      1. You can get I2C DACs/ADCs for a few bucks. A darlington driver array would be even less.
        The only point I’d agree on is real time applications, though I do wonder if a RasPi would achieve better performance most of the time anyway, given the difference in their clock rates.

  3. it might be cheaper than the official eth shield yes…but it’s not cheaper than a nanode or those ENC28J60 shields on ebay/etc.

    of course, the official shield has other limitations; it can’t do ipv6.
    the ENC28J60 based ones have a memory limit so it usually can only do one packet worth.

    1. Since you’ve mentioned the ENC28J60 modules, how hard would it be to interface them to another microcontroller, say, a ARM Cortex M3 STM32F103? On the hardware side it seems it will just require a SPI interface, but how hard is it to make it work on the software side? Are there some libraries ready for such? Decent free TCP/IP stacks?

  4. I bought a Pi with the intention of using it for home automation / measurement and have made decent progress using a teensy running arduino code. At $19 it seems pretty good value.
    Rather than use the gpio pins though, I’m using serial (from php) to send instructions to the teensy, which seems less likely to damage the pi when I screw it up. Also has the advantage I can do all the development on my laptop then just move the hardware.

  5. Rpi can not only act as ethernet/wifi shield, but also provides sd card storage option. Ofcourse we can use rpi gpio pins, but arduino has whole world of shields/ sensor interfaces built around it which makes the dfference.

  6. I will be in the Gold Coast later this year and would like to know which Lawn Bowls Club Errol G belongs to so that I might arrange a visit and learn from his “team’s” experience in constructing their LED scoreboard “from scratch”. There are more than 8 Lawn Bowls Clubs on the Gold Coast (which is more than 1500kms from my home club in Australia) and I would appreciate help to make contact. .

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.