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:
0:6da5625a6946
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 0:6da5625a6946 1 // SerialConnect.h - Connects two serial ports together.
isonno 0:6da5625a6946 2
isonno 0:6da5625a6946 3 #ifndef _SERIALCONNECT_
isonno 0:6da5625a6946 4 #define _SERIALCONNECT_
isonno 0:6da5625a6946 5
isonno 0:6da5625a6946 6 #pragma once
isonno 0:6da5625a6946 7
isonno 0:6da5625a6946 8 #ifndef MBED_H
isonno 0:6da5625a6946 9 #include "mbed.h"
isonno 0:6da5625a6946 10 #endif
isonno 0:6da5625a6946 11
isonno 0:6da5625a6946 12 class SerialConnect
isonno 0:6da5625a6946 13 {
isonno 0:6da5625a6946 14 public:
isonno 0:6da5625a6946 15 // By default, makes "9600 8N1" connections for both ports.
isonno 0:6da5625a6946 16 // Need to add APIs to change the port settings...
isonno 0:6da5625a6946 17 SerialConnect( PinName txA, PinName rxA,
isonno 0:6da5625a6946 18 PinName txB = USBTX, PinName rxB = USBRX );
isonno 0:6da5625a6946 19
isonno 0:6da5625a6946 20 virtual ~SerialConnect() {};
isonno 0:6da5625a6946 21
isonno 0:6da5625a6946 22 // Override these if you want to molest the traffic as it
isonno 0:6da5625a6946 23 // moves from port to port.
isonno 0:6da5625a6946 24 virtual void HandleAtoB();
isonno 0:6da5625a6946 25 virtual void HandleBtoA();
isonno 0:6da5625a6946 26
isonno 0:6da5625a6946 27 protected:
isonno 0:6da5625a6946 28 Serial fPortA;
isonno 0:6da5625a6946 29 Serial fPortB;
isonno 0:6da5625a6946 30 };
isonno 0:6da5625a6946 31
isonno 0:6da5625a6946 32 #endif