I love my Raspberry Pi. I built an HTPC around one and I use it almost every day. It suits this purpose quite well.
But, I don’t really take full advantage of the Pi in this capacity. Afterall, there is most of a GPIO header on that thing that I’m not using for anything. Recently, I was working a home automation project using an Arduino. I kept running into roadblocks concerning capacity. If (for example) you take an Arduino Uno R3, add an Ethernet Shield w/SD Card slot and then implement the all the libraries and essentially turn your Arduino into a mini-webserver, you’ll quickly find that you don’t have a whole lot of room for your program. And if you want to implement a library to read/write INI files on your micro SD card, you have even less room. Even with an Arduino Mega, you aren’t left with much space to do anything really cool or complex.
Most of the code I wrote, simply wouldn’t fit on the Arduino. Even after countless optimizations, cutting out chunks that weren’t 100% necessary, removing some error checking code, etc., I usually still came up a little bit short. The only option was to remove functionality, split it up into chunks across multiple Arduinos. So naturally, when you look at this from a cost perspective, it just doesn’t make sense. Enter, the Raspberry Pi.
I mean, in terms of processing power and program capacity, it’s several orders of magnitudes greater…. for $35. Granted, these are 2 totally different platforms, but that is my point: I was trying to use the wrong tool for the job. *Can* it be done with an Arduino-based platform? Given the right additional components and some clever and highly-optimized code, yes. Or, you could just install Apache on a Raspberry Pi, and actually be able to build *real* web pages and take advantage of CSS and JS, etc and not be constrained by space problems.
It’s still small, still low power, and still network and web-enabled. Now, there is a bit of work necessary to turn a Raspberry Pi into a webserver. Not much more than you would on any other Linux-based machine, but if you’ve never done it before, it might seem a bit tedious and confusing. The standard deployment is know as LAMP (Linux, Apache, MySQL, and PHP). To automate the deployment process to make things easier on myself (and I also figured it might make things easier on the newbies to get started), decided to build a tool to do all the hard work for me.
I call it LAMPi. You can find it on my github page. You just download it, unpack it, then run the ‘ilovelamp’ script (the play on words was intentional) and let it do the rest. Optionally, it can also install VSFTP server and phpMyAdmin for you as well.
Go check it out.
Leave a Reply
You must be logged in to post a comment.