Here is the error message where tried 152 interrupt python example code:
./digital_input_interrupt.py
MCC 152 digital input interrupt example.
Enables interrupts on the inputs and displays their state when
they change.
Functions / Methods demonstrated:
mcc152.dio_reset
mcc152.dio_config_write_port
mcc152.dio_input_read_port
mcc152.dio_int_status_read_port
mcc152.info
interrupt_callback_enable
interrupt_callback_disable
Using address 0.
Current input values are 0xFF
Waiting for changes, enter any text to exit.
Traceback (most recent call last):
File "/home/pi/work/./digital_input_interrupt.py", line 122, in <module>
main()
File "/home/pi/work/./digital_input_interrupt.py", line 106, in main
interrupt_callback_enable(callback, int_count)
File "/usr/local/lib/python3.9/dist-packages/daqhats/hats.py", line 320, in interrupt_callback_enable
raise Exception("Could not enable callback function.")
Exception: Could not enable callback function.
Question
Zhijang
Any suggestion is welcome. Thanks in advance.
Here is the error message where tried 152 interrupt python example code:
./digital_input_interrupt.py
MCC 152 digital input interrupt example.
Enables interrupts on the inputs and displays their state when
they change.
Functions / Methods demonstrated:
mcc152.dio_reset
mcc152.dio_config_write_port
mcc152.dio_input_read_port
mcc152.dio_int_status_read_port
mcc152.info
interrupt_callback_enable
interrupt_callback_disable
Using address 0.
Current input values are 0xFF
Waiting for changes, enter any text to exit.
Traceback (most recent call last):
File "/home/pi/work/./digital_input_interrupt.py", line 122, in <module>
main()
File "/home/pi/work/./digital_input_interrupt.py", line 106, in main
interrupt_callback_enable(callback, int_count)
File "/usr/local/lib/python3.9/dist-packages/daqhats/hats.py", line 320, in interrupt_callback_enable
raise Exception("Could not enable callback function.")
Exception: Could not enable callback function.
Link to comment
Share on other sites
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now