kopia lustrzana https://github.com/peterhinch/micropython-samples
README,md Encoder section: add ref to Dave Hylands' Pyboard script.
rodzic
425f66e84e
commit
e245f6f37a
15
README.md
15
README.md
|
@ -198,17 +198,18 @@ connection details where possible.
|
||||||
## 4.7 Rotary Incremental Encoder
|
## 4.7 Rotary Incremental Encoder
|
||||||
|
|
||||||
Classes for handling incremental rotary position encoders. Note Pyboard timers
|
Classes for handling incremental rotary position encoders. Note Pyboard timers
|
||||||
can do this in hardware. These samples cater for cases where that solution
|
can do this in hardware, as shown
|
||||||
can't be used. The [encoder_timed.py](./encoders/encoder_timed.py) sample
|
[in this script](https://github.com/dhylands/upy-examples/blob/master/encoder.py)
|
||||||
provides rate information by timing successive edges. In practice this is
|
from Dave Hylands. These samples cater for cases where that solution can't be
|
||||||
likely to need filtering to reduce jitter caused by imperfections in the
|
used. The [encoder_timed.py](./encoders/encoder_timed.py) sample provides rate
|
||||||
encoder geometry.
|
information by timing successive edges. In practice this is likely to need
|
||||||
|
filtering to reduce jitter caused by imperfections in the encoder geometry.
|
||||||
|
|
||||||
There are other algorithms but this is the simplest and fastest I've
|
There are other algorithms but this is the simplest and fastest I've
|
||||||
encountered.
|
encountered.
|
||||||
|
|
||||||
These were written for encoders producing TTL outputs. For switches, adapt the
|
These were written for encoders producing logic outputs. For switches, adapt
|
||||||
pull definition to provide a pull up or pull down as required.
|
the pull definition to provide a pull up or pull down as required.
|
||||||
|
|
||||||
The [encoder_portable.py](./encoders/encoder_portable.py) version should work on
|
The [encoder_portable.py](./encoders/encoder_portable.py) version should work on
|
||||||
all MicroPython platforms. Tested on ESP8266. Note that interrupt latency on
|
all MicroPython platforms. Tested on ESP8266. Note that interrupt latency on
|
||||||
|
|
Ładowanie…
Reference in New Issue