RGBWeb is an evolution of RGBDuino that removes the Bluetooth requirement by using an internet connection. This does, however require a server to remain running with the Arduino attached.
RGBWeb has also been built with many new features that RGBDuino never had. While many could be implemented on RGBDuino, I will probably not add the features. The code is all available on the project page for RGBDuino, and anyone is welcome to modify and add features. My only wish is that you give partial credit back to me, Corban Mailloux, if you make a new product with the code. I would also love to hear about developments people are making on my code, so please keep me updated at RGBDuino@corb.co.
RGBWeb is a project created to use an Android device and an Arduino to control a string of red-green-blue LEDs over the internet. The project consists of three main parts: the hardware side (Arduino), the server configuration, and the Android software.
This is what the app looks like:
The Arduino has very similar wiring to RGBDuino. The only difference is that RGBWeb does not have the Bluetooth module attached. See the RGBDuino project page for an image of the basic configuration.
Essentially, the Arduino receives commands over the USB (serial) connection. The power N-channel MOSFETS have their gate legs (left legs) connected to PWM pins 9, 10, and 11. Each gate leg is also connected through a resistor to GND. While there may be an optimal value for this resistor, I have found that this setup is not picky about resistance. The drain leg (middle leg) is connected to one of the negative returns from the LED strip. The source legs (right leg) are all connected to GND.
The 12 volt power source connects to GND and the common anode on the LED strip.
The parts I used were:
The server configuration was the part of this project that gave me the most trouble. At different times, I've had this project running on two different types of servers. It was running on an Apache server running on my main computer, but now it is running on a Windows Server 2012 Datacenter machine that is my general purpose server.
I discovered that the biggest problem was ensuring a basic server was established and that the server was properly configured to run PHP.
I chose to write the server web pages in PHP because I have used it before and because I know that it can handle serial communications from the server to a locally attached device (specifically, an Arduino). Reading from a serial port is not, at the time of writing, possible on Windows, but that's okay for our purposes. It would be nice for future updates to be able to get a response from the Arduino, though.
This would set the lights on to white at full brightness.
The other web page is not much of a page at all; it contains almost no HTML and is only intended to be accessed by the Android app. It uses PHP POST requests sent by the Android app to get commands. This is the page that handles more complex features, such as password protection (very basic and unencrypted) and other custom commands like fading.
The actual PHP files, in the correct folder structure on on Github (see link below).
The basic setup of the server is like this:
The Android app was written using MIT's App Inventor. The project source and a compiled APK version of the app are available on GitHub.
Any questions can be directed at RGBWeb@corb.co.