Source code for the Curilights Controller. See http://www.saccade.com/writing/projects/CuriController/ for details.

Dependencies:   FatFileSystem mbed

This is the source code for the Curilights controller. This lets you interactively control a string of Curilights. It provides a simple click-wheel user interface for changing colors, brightness and behavior. It responds to movement and lighting.

Finished Controller

/media/uploads/isonno/nxp3872_controllerclose.jpg

System Block Diagram

/media/uploads/isonno/blockdiagram.png

Revision:
1:d1da77023e6a
Child:
3:0ac64c4ca40f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/SettingsMenu.cpp	Sun Jan 15 09:07:04 2012 +0000
@@ -0,0 +1,45 @@
+//
+// Settings menu implementation
+//
+
+#include "SettingsMenu.h"
+#include "UserInterface.h"
+
+/*
+class SettingsMenu : public UIMenu
+{
+public:
+    SettingsMenu( CheapLCD * lcd, HomeMenu * parent );
+    virtual ~SettingsMenu() {};
+    
+protected:
+    virtual void KnobPushed();
+    virtual void AttachButton( PushButton * button )
+        { button->attach( this, &SettingsMenu::KnobPushed ); }
+    
+private:
+    HomeMenu * fParent;
+    CheapLCD * fLCD;
+};
+*/
+
+SettingsMenu::SettingsMenu( CheapLCD * lcd, HomeMenu * parent )
+: UIMenu( lcd, "Settings" ),
+  fLCD( lcd ), fParent( parent )
+{
+    fLabels.push_back( string( "Light Sensor" ) );
+    fLabels.push_back( string( "Motion Sensor" ) );
+    fLabels.push_back( string( "Defaults" ) );
+    fLabels.push_back( string( "Debug" ) );
+    fLabels.push_back( string( "Exit Settings" ) );
+}
+
+void SettingsMenu::KnobPushed()
+{
+    switch( SelectedItem() )
+    {
+    case 4:
+        SwitchTo( fParent );
+        break;
+    }
+}