Cubic Hand project for EECS 249A course.

Dependencies:   MMA8451Q TSI cc3000_hostdriver_mbedsocket NVIC_set_all_priorities mbed Multi_WS2811

Committer:
robertbui
Date:
Thu Dec 11 07:11:32 2014 +0000
Revision:
39:e90071c1535a
Parent:
30:0933d7f2fe78
Child:
43:cf824a44a040
Added initial cube parameter functions.

Who changed what in which revision?

UserRevisionLine numberNew contents of line
joseoyola 16:a3de0c0dbe33 1 #include "mbed.h"
joseoyola 16:a3de0c0dbe33 2 #include "WS2811.h"
robertbui 39:e90071c1535a 3 #include "CubeUpdateParameters.h"
joseoyola 16:a3de0c0dbe33 4
joseoyola 16:a3de0c0dbe33 5 #pragma once
joseoyola 16:a3de0c0dbe33 6
joseoyola 16:a3de0c0dbe33 7 class LedCube
joseoyola 16:a3de0c0dbe33 8 {
joseoyola 16:a3de0c0dbe33 9 public:
joseoyola 16:a3de0c0dbe33 10 LedCube();
joseoyola 16:a3de0c0dbe33 11 ~LedCube();
joseoyola 16:a3de0c0dbe33 12 void Init(int x, int y, int z);
joseoyola 16:a3de0c0dbe33 13 int getLedIndex(int panel, int x, int y);
joseoyola 16:a3de0c0dbe33 14 void updateLEDs(bool on, int size, int x, int y, int z);
joseoyola 24:554ea084eddf 15 void updateLEDsOld(bool on, int size, int x, int y, int z);
joseoyola 16:a3de0c0dbe33 16 void cubeUpdate();
robertbui 30:0933d7f2fe78 17 void UpdateCube(int size, int deltaX, int deltaY, int deltaZ, float hue);
robertbui 39:e90071c1535a 18 void UpdateCube(CubeUpdateParameters cubeParams);
joseoyola 16:a3de0c0dbe33 19 int move(int deltaX, int deltaY, int deltaZ);
joseoyola 16:a3de0c0dbe33 20 void changeColor(float hue);
joseoyola 16:a3de0c0dbe33 21 void changeSize(int newSize);
joseoyola 16:a3de0c0dbe33 22
joseoyola 16:a3de0c0dbe33 23 private:
joseoyola 16:a3de0c0dbe33 24 unsigned const X;
joseoyola 16:a3de0c0dbe33 25 unsigned const Y;
joseoyola 16:a3de0c0dbe33 26 unsigned const Z;
joseoyola 16:a3de0c0dbe33 27 int pos[3];
joseoyola 16:a3de0c0dbe33 28 int prevPos[3];
joseoyola 16:a3de0c0dbe33 29 int size;
joseoyola 16:a3de0c0dbe33 30 int prevSize;
joseoyola 20:c2bc970bbff8 31
joseoyola 16:a3de0c0dbe33 32 float saturation;
joseoyola 16:a3de0c0dbe33 33 float brightness;
joseoyola 16:a3de0c0dbe33 34 uint8_t r;
joseoyola 16:a3de0c0dbe33 35 uint8_t g;
joseoyola 16:a3de0c0dbe33 36 uint8_t b;
joseoyola 16:a3de0c0dbe33 37 WS2811 ledStrip1;
joseoyola 16:a3de0c0dbe33 38 WS2811 ledStrip2;
joseoyola 16:a3de0c0dbe33 39
joseoyola 16:a3de0c0dbe33 40 };