![](/media/cache/group/default_image.jpg.50x50_q85.jpg)
Cubic Hand project for EECS 249A course.
Dependencies: MMA8451Q TSI cc3000_hostdriver_mbedsocket NVIC_set_all_priorities mbed Multi_WS2811
Diff: ledCube.h
- Revision:
- 56:f95ec9baa4cb
- Parent:
- 55:0a16046b1485
--- a/ledCube.h Fri Dec 12 19:44:18 2014 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,40 +0,0 @@ -#include "mbed.h" -#include "WS2811.h" -#include "CubeUpdateParameters.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 updateLEDsOld(bool on, int size, int x, int y, int z); - void cubeUpdate(); - void UpdateCube(int size, int deltaX, int deltaY, int deltaZ, float hue); - void UpdateCube2(CubeUpdateParameters cubeParams); - 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; - -}; \ No newline at end of file