3 Commits

Author SHA1 Message Date
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