-
Notifications
You must be signed in to change notification settings - Fork 220
Closed
Description
From the Adafruit forum:
https://forums.adafruit.com/viewtopic.php?f=49&t=145110&p=716829#p716829
Test:
from Adafruit_BBIO.Encoder import RotaryEncoder, eQEP2
test_encoder = RotaryEncoder(eQEP2)
# Enable
test_encoder.enable()
# Attempt to set frequency
test_encoder.frequency = 2000
print(test_encoder.frequency)
# Disable
test_encoder.disable()
Error:
ebian@beaglebone:~$ python encoder_test.py
2000
debian@beaglebone:~$ python3 encoder_test.py
OSError: [Errno 22] Invalid argument
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "encoder_test.py", line 9, in <module>
test_encoder.frequency = 2000
File "/usr/local/lib/python3.5/dist-packages/Adafruit_BBIO/Encoder.py", line 355, in frequency
self._eqep.node.period = str(period)
File "/usr/local/lib/python3.5/dist-packages/Adafruit_BBIO/sysfs.py", line 93, in __setattr__
fp.write(val)
OSError: [Errno 22] Invalid argument
Metadata
Metadata
Assignees
Labels
No labels