Cubic Hand project for EECS 249A course.

Dependencies:   MMA8451Q TSI cc3000_hostdriver_mbedsocket NVIC_set_all_priorities mbed Multi_WS2811

main.cpp

Committer:
robertbui
Date:
2014-12-11
Revision:
41:367cab0162de
Parent:
40:bdd949fc3bc2
Child:
43:cf824a44a040

File content as of revision 41:367cab0162de:

#include "mbed.h"
//#include "main.h"
#include "DataGlove.h"
#include "Glove.h"
#include "Correction.h"
#include "GestureRecognition.h"
#include "CubeUpdateParameters.h"
#include "ledCube.h" 

#pragma once

DataGlove MasterGlove;
Correction Correct;
GestureRecognition gestureSet; 
LedCube cube; 



int main() 
{
    long Counter = 0;
    //DigitalOut StatusLED(LED2);
    //StatusLED = 0;
    Glove unfiltered;
    Glove filtered;
    CubeUpdateParameters params; 
    Serial pc(USBTX, USBRX);
    pc.baud(115200);
    pc.printf("Connceted to PC \r\n");
    MasterGlove.Init();
    cube.Init(0,0,0);
    pc.printf("DataGlove Cube Client\r\n");
    
    //cube.cubeUpdate();
    while(true) 
    {
        unfiltered = MasterGlove.ReceiveBlocking();
        filtered = Correct.Correct(unfiltered);
        //params = gestureSet.sensorToGesture(filtered);
        params.size = 2;
        params.deltaX = 0;
        params.deltaY = 0;
        params.deltaZ = 0;
        params.hue = 0.5;
        cube.UpdateCube(params); 
        //pc.printf("Looping \r\n");
        //wait(0.1);
        /*if(Counter++%25 == 0)
        {
            StatusLED = !StatusLED;
        }*/
     }
}