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.
encoderKRAI Class Reference
Quadrature Encoder Interface. More...
#include <encoderKRAI.h>
Public Member Functions | |
| encoderKRAI (PinName channelA, PinName channelB, int pulsesPerRev, Encoding encoding=X2_ENCODING) | |
| Membuat interface dari encoder. | |
| void | reset (void) |
| Reset encoder. | |
| int | getPulses (void) |
| Membaca pulse yang didapat oleh encoder. | |
| int | getRevolutions (void) |
| Membaca putaran yang didapat oleh encoder. | |
Detailed Description
Quadrature Encoder Interface.
Definition at line 21 of file encoderKRAI.h.
Constructor & Destructor Documentation
| encoderKRAI | ( | PinName | channelA, |
| PinName | channelB, | ||
| int | pulsesPerRev, | ||
| Encoding | encoding = X2_ENCODING |
||
| ) |
Membuat interface dari encoder.
- Parameters:
-
inA DigitalIn, out A dari encoder inB DigitalIn, out B dari encoder
Definition at line 22 of file encoderKRAI.cpp.
Member Function Documentation
| int getPulses | ( | void | ) |
Membaca pulse yang didapat oleh encoder.
- Returns:
- Nilai pulse yang telah dilalui.
Definition at line 66 of file encoderKRAI.cpp.
| int getRevolutions | ( | void | ) |
Membaca putaran yang didapat oleh encoder.
- Returns:
- Nilai revolusi/putaran yang telah dilalui.
Definition at line 72 of file encoderKRAI.cpp.
| void reset | ( | void | ) |
Reset encoder.
Menset pulse dan revolusi/putaran menjadi 0
Definition at line 53 of file encoderKRAI.cpp.
Generated on Thu Jul 14 2022 21:26:57 by
1.7.2