Description
Re this page:
https://docs.wokwi.com/parts/wokwi-ky-040
Is it your intent that the simulation of the KY-040 exactly match the behavior of the actual device? If that is the intent, then both the description (in the Operation section) and the associated example code (first example under Reading the rotation) are incorrect: The stated description does not reflect the behavior of the actual device, and the associated example code will not work correctly on the actual device.
I would be happy to provide a pull request with corrections that bring the description and the code into agreement with actual device behavior, but first wanted to ask whether it is even your intent that the simulation match the actual device behavior. Perhaps your intent is only that the simulation behave in a functionally similar way, but not mimic the device exactly....?