The MGC3130 is the world’s first electrical-field (E-field) based three-dimensional (3D) tracking and gesture controller

Dependencies:   BufferedArray

Dependents:   NucleoMGC3130 i2c_master

Revision:
0:92f17b057d6b
Child:
1:621c4e9238ef
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MGC3130.h	Tue Oct 06 22:35:38 2015 +0000
@@ -0,0 +1,34 @@
+#ifndef UK_AC_HERTS_SMARTLAB_MGC3130
+#define UK_AC_HERTS_SMARTLAB_MGC3130
+
+#include "mbed.h"
+#include "GestICMsg.h"
+#include "SensorData.h"
+
+class MGC3130
+{
+private:
+    static const int FREQUENCY_STANDARD = 100000;
+    static const int FREQUENCY_FULL = 400000;
+    static const int FREQUENCY_FAST = 1000000;
+    static const int FREQUENCY_HIGH = 3200000;
+
+    // EI0 Pin
+    // The TS line is used to check whether the I2C data is valid and can be sent from MGC3X30 to the host controller.
+    DigitalInOut TS_Line;
+
+    I2C _i2c_bus;
+    int _speed;
+    int _addr;
+    GestICMsg msg;
+    SensorData sensor;
+
+public:
+    MGC3130(PinName sda, PinName scl, PinName EI0, bool IS2);
+
+    GestICMsg * readMsg();
+    
+    SensorData * readSensorData();
+};
+
+#endif
\ No newline at end of file