MyoWare Sensor / MyoWare
Revision:
0:7bb1367b48b8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Wed Mar 08 20:32:11 2017 +0000
@@ -0,0 +1,33 @@
+#include "mbed.h"
+#include "MyoWare.h"
+ 
+Serial pc(USBTX, USBRX); // tx, rx
+//AnalogIn sig(p15);       // Gives the rectified and integrated EMG signal
+
+float logic = 0.7f; 
+int steps = 20;
+MyoWare ms(p15, logic, steps);
+
+//This is a simple test of the myoware muscle sensor
+int main() {
+    
+    while(1) {
+        float sig_val = ms.read();
+        bool onOff = ms.control();
+        int stepNum = ms.magnitude();
+        //float sect = float(steps/100.0f);
+        
+        
+        
+        pc.printf("Sig Value: %f\n\r", sig_val);  
+        pc.printf("Logic Value: %f\n\r", logic);  
+        pc.printf("Digital Value: %d\n\r", onOff); 
+        pc.printf("Total Steps: %d\n\r", steps);
+        pc.printf("Step Value Value: %d\n\r", stepNum); 
+        //pc.printf("temp Value Value: %d\n\r", temp); 
+        //pc.printf("sect Value Value: %f\n\r", sect); 
+        pc.printf("\n\r"); 
+        wait(2);
+    }
+    
+}
\ No newline at end of file