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
System Block Diagram
Diff: SerialConnect.h
- Revision:
- 0:6da5625a6946
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/SerialConnect.h Thu Dec 29 01:59:53 2011 +0000 @@ -0,0 +1,32 @@ +// SerialConnect.h - Connects two serial ports together. + +#ifndef _SERIALCONNECT_ +#define _SERIALCONNECT_ + +#pragma once + +#ifndef MBED_H +#include "mbed.h" +#endif + +class SerialConnect +{ +public: + // By default, makes "9600 8N1" connections for both ports. + // Need to add APIs to change the port settings... + SerialConnect( PinName txA, PinName rxA, + PinName txB = USBTX, PinName rxB = USBRX ); + + virtual ~SerialConnect() {}; + + // Override these if you want to molest the traffic as it + // moves from port to port. + virtual void HandleAtoB(); + virtual void HandleBtoA(); + +protected: + Serial fPortA; + Serial fPortB; +}; + +#endif