Using the Raspi as an Ethernet shield

[Alexandre] wanted to set up a web-based temperature logger with his Arduino, but found the Arduino Ethernet shield a little finicky. Since his Raspberry pi was just delivered, he figured he could use the Raspi as an Ethernet shield with just a little bit of coding.

After [Alexandre] set up his Arduino to send a thermocouple through the USB, the only thing left to do was to add node.js to the Raspi’s Debian installation. Every five minutes, the Arduino wakes up, takes a temperature reading, and sends it over to the Raspberry pi. From there, it’s easy parse the Arduino’s JSON output and serve it up on the web.

In the end, [Alexandre] successfully set up his Raspberry pi as an Ethernet shield to serve a web page displaying the current temperature (don’t F5 that link, btw). One interesting thing we have to point out is the cost of setting up this online temperature logger: the Arduino Ethernet shield sells for $45 USD, while the Raspberry pi is available for $35. Yes, it’s actually less expensive to use a Raspberry pi as an Ethernet shield than the current Arduino offerings. There you have it, just in case you were still on the fence about this whole Raspi thing.


Filed under: arduino hacks, Rasberry pi

[original story: Hack a Day]