MyoWare Sensor / MyoWare

Files at this revision

API Documentation at this revision

Comitter:
cturner48
Date:
Wed Mar 08 20:42:25 2017 +0000
Parent:
1:c010b7cc17bf
Commit message:
Updated documentation.

Changed in this revision

MyoWare/MyoWare.h Show annotated file Show diff for this revision Revisions of this file
--- a/MyoWare/MyoWare.h	Wed Mar 08 20:36:32 2017 +0000
+++ b/MyoWare/MyoWare.h	Wed Mar 08 20:42:25 2017 +0000
@@ -14,17 +14,35 @@
 
 #include "mbed.h"
 
-/** Stepper Motor control class
+/** MyoWare Muscle Sensor
  *
  *  Example:
  *  @code
  *  #include "mbed.h"
- *  #include "myowareMS.h"
+ *#include "MyoWare.h"
+ *
+ *Serial pc(USBTX, USBRX); // tx, rx
+ *
+ *float logic = 0.7f; 
+ *int steps = 20;
+ *MyoWare ms(p15, logic, steps);
  *
- *  MyoWare_Muscle_Sensor muSen();
+ *int main() {
  *  
- *  int main() {
+ *  while(1) {
+ *      float sig_val = ms.read();
+ *      bool onOff = ms.control();
+ *      int stepNum = ms.magnitude();
+ *      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("\n\r"); 
+ *      wait(2);
  *  }
+ *  
+ *}
  *  @endcode
  */