I think that there is an error in de documentation in the part:
Examples-Basic usage-Interrupts. The part on the end: 'The Event object....' says:
import pifacecad
cad = pifacecad.PiFaceCAD()
listener = pifacecad.InputEventListener(chip=cad)
listener.register(0, pifacecad.IODIR_RISING_EDGE, print)
listener.activate()
I did try that but I get the error: AttributeError: 'module' object has no attribute 'InputEventListener'.
Is this a typo in the documentation,or is it an error in the module?
I replaced 'InputEventListener' with 'SwitchEventListener' and it works out fine. I get indeed the output on my screen.
I think that there is an error in de documentation in the part: Examples-Basic usage-Interrupts. The part on the end: 'The Event object....' says: