The MGC3130 is the world’s first electrical-field (E-field) based three-dimensional (3D) tracking and gesture controller
Dependents: NucleoMGC3130 i2c_master
Diff: MGC3130.h
- Revision:
- 7:eacd776fce29
- Parent:
- 6:b511421e7dc8
--- a/MGC3130.h Tue Oct 13 19:59:27 2015 +0000 +++ b/MGC3130.h Thu Oct 15 16:10:55 2015 +0000 @@ -17,6 +17,91 @@ /** * Outlines the function of the Library’s I2C message interface, and contains the complete message reference to control and operate the MGC3X30 system. + * + * Example: + * @code +*#include "mbed.h" +*#include "MGC3130.h" +* +*SensorData * msg = NULL; +* +*void init() +*{ +* AirWheelDetection air(true); +* device.setRuntimeParameter(&air); +* +* TouchDetection touch(true); +* device.setRuntimeParameter(&touch); +* +* OutputEnable setting; +* setting.enableGestureData(true)->enableTouchInfo(true)->enableAirWheelInfo(true)->enableNoisePower(false) +* ->enablexyzPosition(false)->enableDSPStatus(false)->enableUncalibratedSignal(false)->enableSignalDeviation(false); +* device.setRuntimeParameter(&setting); +*} +* +*void touch() +*{ +* TouchInfo * info = msg->getTouchInfo(); +* +* if (info == NULL) +* return; +* +* if (info->isTapCenterElectrode() == false) +* return; +*} +* +*void airWheel() +*{ +* int * wheel = msg->getAirWheelInfo(); +* if (wheel == NULL) +* return; +*} +* +*void gesture() +*{ +* GestureInfo * info = msg->getGestureInfo(); +* +* if (info == NULL) +* return; +* +* switch (info->getRecognizedGesture()) { +* //Garbage Model +* case 1 : +* break; +* //Flick West To East +* case 2 : +* break; +* //Flick East To West +* case 3 : +* break; +* //Flick South To North +* case 4 : +* break; +* //Flick North To South +* case 5 : +* break; +* } +*} +* +*int main() +*{ +* init(); +* +* while(1) { +* msg = device.readSensorData(); +* +* if (msg == NULL) +* continue; +* +* touch(); +* +* gesture(); +* +* airWheel(); +* } +*} + * @endcode + * */ class MGC3130 {