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

Committer:
isonno
Date:
Mon Feb 11 05:04:18 2013 +0000
Revision:
4:cfef06d8bb96
Parent:
3:0ac64c4ca40f
Minor changes to add backlight routines.  Not hooked up yet, shouldn't affect build operation.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
isonno 4:cfef06d8bb96 1 #ifndef _SETTINGSMENU_
isonno 4:cfef06d8bb96 2 #define _SETTINGSMENU_
isonno 4:cfef06d8bb96 3
isonno 4:cfef06d8bb96 4 #ifndef _UIMENU_
isonno 4:cfef06d8bb96 5 #include "UIMenu.h"
isonno 4:cfef06d8bb96 6 #endif
isonno 4:cfef06d8bb96 7
isonno 4:cfef06d8bb96 8 class HomeMenu;
isonno 4:cfef06d8bb96 9 class SettingsMenu;
isonno 4:cfef06d8bb96 10
isonno 4:cfef06d8bb96 11 class DebugMenu : public UIMenu
isonno 4:cfef06d8bb96 12 {
isonno 4:cfef06d8bb96 13 public:
isonno 4:cfef06d8bb96 14 DebugMenu( CheapLCD * lcd, SettingsMenu * parent );
isonno 4:cfef06d8bb96 15 virtual ~DebugMenu() {};
isonno 4:cfef06d8bb96 16 void SetItem( int item, const char * name, int value );
isonno 4:cfef06d8bb96 17
isonno 4:cfef06d8bb96 18 protected:
isonno 4:cfef06d8bb96 19 virtual void KnobPushed();
isonno 4:cfef06d8bb96 20 SETUP_KNOBPUSH_CALLBACK( DebugMenu );
isonno 4:cfef06d8bb96 21
isonno 4:cfef06d8bb96 22 private:
isonno 4:cfef06d8bb96 23 SettingsMenu * fParent;
isonno 4:cfef06d8bb96 24 };
isonno 4:cfef06d8bb96 25
isonno 4:cfef06d8bb96 26 class LightSensorMenu : public UIMenu
isonno 4:cfef06d8bb96 27 {
isonno 4:cfef06d8bb96 28 public:
isonno 4:cfef06d8bb96 29 LightSensorMenu( CheapLCD * lcd, SettingsMenu * parent );
isonno 4:cfef06d8bb96 30 virtual ~LightSensorMenu() {};
isonno 4:cfef06d8bb96 31
isonno 4:cfef06d8bb96 32 protected:
isonno 4:cfef06d8bb96 33 virtual void KnobPushed();
isonno 4:cfef06d8bb96 34 SETUP_KNOBPUSH_CALLBACK( LightSensorMenu );
isonno 4:cfef06d8bb96 35
isonno 4:cfef06d8bb96 36 private:
isonno 4:cfef06d8bb96 37 SettingsMenu * fParent;
isonno 4:cfef06d8bb96 38 int fLightState;
isonno 4:cfef06d8bb96 39 };
isonno 4:cfef06d8bb96 40
isonno 4:cfef06d8bb96 41 class SettingsMenu : public UIMenu
isonno 4:cfef06d8bb96 42 {
isonno 4:cfef06d8bb96 43 public:
isonno 4:cfef06d8bb96 44 SettingsMenu( CheapLCD * lcd, HomeMenu * parent );
isonno 4:cfef06d8bb96 45 virtual ~SettingsMenu() {};
isonno 4:cfef06d8bb96 46
isonno 4:cfef06d8bb96 47 protected:
isonno 4:cfef06d8bb96 48 virtual void KnobPushed();
isonno 4:cfef06d8bb96 49 SETUP_KNOBPUSH_CALLBACK( SettingsMenu );
isonno 4:cfef06d8bb96 50
isonno 4:cfef06d8bb96 51 private:
isonno 4:cfef06d8bb96 52 HomeMenu * fParent;
isonno 4:cfef06d8bb96 53 LightSensorMenu fLightSensorMenu;
isonno 4:cfef06d8bb96 54 DebugMenu fDebugMenu;
isonno 4:cfef06d8bb96 55 };
isonno 4:cfef06d8bb96 56
isonno 4:cfef06d8bb96 57
isonno 4:cfef06d8bb96 58 #endif