Divide the slider into four areas

Dependents:   JeSuisUnGrandHomme

Fork of info1 by Guillaume Alli

Revision:
0:432cc3112901
Child:
1:6bd5a7965b66
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/info1.cpp	Tue Dec 16 12:25:56 2014 +0000
@@ -0,0 +1,36 @@
+#include "mbed.h"
+#include "TSISensor.h"
+
+
+TSISensor tsi2;
+
+
+int appui(void)
+{
+    if (tsi2.readPercentage()>0)
+        return 1;
+    else
+        return 0;
+}
+
+float appui_fct(float seuil)
+{
+    if (seuil==0) 
+    {
+        if (tsi2.readPercentage()>0)
+            return 1;
+        else
+            return 0;
+    }
+    
+    else if (seuil>0 && seuil <=1) 
+    {
+            return tsi2.readPercentage();
+    }
+    
+    else
+    {
+            return -1;
+    }   
+    
+}