Commit Graph

4 Commits

Author SHA1 Message Date
Damien George
43d38d995e tests/extmod_hardware/machine_encoder.py: Separate the connection test.
Because it requires a different configuration of the pins (in `setUp`).
Eg on mimxrt pins used for an Encoder cannot be read.

Signed-off-by: Damien George <damien@micropython.org>
2026-03-09 00:02:04 +11:00
Ihor Nehrutsa
094437686f tests/extmod_hardware/machine_encoder.py: Use target_wiring for encoder.
Signed-off-by: Ihor Nehrutsa <Ihor.Nehrutsa@gmail.com>
2025-11-19 16:10:12 +11:00
Ihor Nehrutsa
d980bbd237 tests/extmod_hardware/machine_encoder.py: Fix initial rotation count.
ESP32 requires initial high levels of the channels before starting the
count, in order to have 4 pulse for the first rotation.

Also add tests for encoder phases x2 and x4.

Signed-off-by: Ihor Nehrutsa <Ihor.Nehrutsa@gmail.com>
2025-11-19 16:02:31 +11:00
Angus Gratton
907c5e9976 tests/extmod_hardware: Add basic tests for machine.Counter and Encoder.
These don't test any advanced features, just the basics.

This work was funded through GitHub Sponsors.

Signed-off-by: Angus Gratton <angus@redyak.com.au>
2025-08-02 00:03:03 +10:00