suu pen / RotationalEncoder

Dependents:   RotationalEncoder_Hello

Files at this revision

API Documentation at this revision

Comitter:
suupen
Date:
Sun Oct 23 03:44:28 2016 +0000
Parent:
1:57c43aac7007
Commit message:
include comment to example program code

Changed in this revision

RotationalEncoder.h Show annotated file Show diff for this revision Revisions of this file
--- a/RotationalEncoder.h	Sun Oct 23 02:18:28 2016 +0000
+++ b/RotationalEncoder.h	Sun Oct 23 03:44:28 2016 +0000
@@ -45,7 +45,23 @@
  *   *2:interrupt up side is dicition process
  *
  * <example program>
+ * @code
+ * #include "mbed.h"
+ * #include "RotationalEncoder.h"
  *
+ * RotationalEncoder encoder(p21, p23);
+ *
+ * BusOut led(LED1, LED2, LED3, LED4);
+ * 
+ * int main() {
+ *   while(1) {
+ *       
+ *   led = encoder.getAbsolutePulses();
+ *   printf("abs = %4i   rel = %4i\r\n",encoder.getAbsolutePulses(), encoder.getRelativePulses());
+ *
+ *   }
+ * }
+ * @endcode
  */