Cubic Hand project for EECS 249A course.
Dependencies: MMA8451Q TSI cc3000_hostdriver_mbedsocket NVIC_set_all_priorities mbed Multi_WS2811
ledCube.h
- Committer:
- joseoyola
- Date:
- 2014-12-10
- Revision:
- 20:c2bc970bbff8
- Parent:
- 16:a3de0c0dbe33
- Child:
- 24:554ea084eddf
File content as of revision 20:c2bc970bbff8:
#include "mbed.h" #include "WS2811.h" #pragma once class LedCube { public: LedCube(); ~LedCube(); void Init(int x, int y, int z); int getLedIndex(int panel, int x, int y); void updateLEDs(bool on, int size, int x, int y, int z); void cubeUpdate(); int move(int deltaX, int deltaY, int deltaZ); void changeColor(float hue); void changeSize(int newSize); private: unsigned const X; unsigned const Y; unsigned const Z; int pos[3]; int prevPos[3]; int size; int prevSize; float saturation; float brightness; uint8_t r; uint8_t g; uint8_t b; WS2811 ledStrip1; WS2811 ledStrip2; };