A networked light switch, giving a user control over their home's lighitng with an Android applicaiton. A user can also set "wake up alarms" and have their lights turn on at predetermined times.
Screen shot of ShineAndRise UI.
ShineRise: Folder containing the Android application
-The application forms a TCP connection on port 3490. The server's IP address is hard coded as my PI's IP address.
TCPSelectServer: cpp code to impliment the server
-To run the server without connecting to MySQL database comment out the "access_database()" function calls.
-The server implements the Select() function to monitor multiple file descriptors without blocking.
MySQLManager: cpp code to form connection to the server's database.
Here is a diagram of the connections between: Android app, the server, and the light's wifi module