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.
Dependents: RotationalEncoder_Hello
Revision 2:0102de0ec7a7, committed 2016-10-23
- 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
*/