Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Revision 2:61ec418c186c, committed 2017-03-08
- 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
  */