Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: MMA8451Q TSI cc3000_hostdriver_mbedsocket NVIC_set_all_priorities mbed Multi_WS2811
main.cpp
00001 #include "mbed.h" 00002 //#include "main.h" 00003 #include "DataGlove.h" 00004 #include "Glove.h" 00005 #include "Correction.h" 00006 #include "GestureRecognition.h" 00007 #include "CubeUpdateParameters.h" 00008 #include "LedCube.h" 00009 00010 #pragma once 00011 00012 DataGlove MasterGlove; 00013 Correction Correct; 00014 GestureRecognition gestureSet; 00015 LedCube cube; 00016 00017 00018 00019 int main() 00020 { 00021 long Counter = 0; 00022 DigitalOut StatusLED(LED2); 00023 StatusLED = 0; 00024 Glove unfiltered; 00025 Glove filtered; 00026 CubeUpdateParameters params; 00027 Serial pc(USBTX, USBRX); 00028 pc.baud(115200); 00029 pc.printf("Connected to PC \r\n"); 00030 MasterGlove.Init(); 00031 cube.Init(0,0,0); 00032 pc.printf("DataGlove Cube Client\r\n"); 00033 00034 //cube.cubeUpdate(); 00035 while(true) 00036 { 00037 unfiltered = MasterGlove.ReceiveBlocking(); 00038 filtered = Correct.Correct(unfiltered); 00039 params = gestureSet.sensorToGesture(filtered); 00040 /*params.size = 2; 00041 params.deltaX = 0; 00042 params.deltaY = 0; 00043 params.deltaZ = 0; 00044 params.hue = 0.5; */ 00045 cube.UpdateCube2(params); 00046 //pc.printf("Looping \r\n"); 00047 //wait(0.1); 00048 if(Counter++%25 == 0) 00049 { 00050 StatusLED = !StatusLED; 00051 } 00052 } 00053 }
Generated on Fri Jul 29 2022 08:38:47 by
1.7.2