Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

uncaught exception in ExtInt interrupt handler line 1 AttributeError: #11

Open
vahithosan opened this issue Oct 12, 2019 · 1 comment
Open

Comments

@vahithosan
Copy link

Hi. Thanks to shearing encoder_timed.py.

I want use for measuring velocity rotary encoder but can't.

`

import encoder_timed
e=encoder_timed.EncoderTimed('A1','A2',0,0)
e.position
0
`

when using rotary encoder;

`

uncaught exception in ExtInt interrupt handler line 1
AttributeError:
uncaught exception in ExtInt interrupt handler line 2
AttributeError:
`

added lines

import micropython
micropython.alloc_emergency_exception_buf(100)
`

`

uncaught exception in ExtInt interrupt handler line 1
Traceback (most recent call last):
File "encoder_timed.py", line 28, in x_callback
AttributeError: 'str' object has no attribute 'value'
uncaught exception in ExtInt interrupt handler line 2
Traceback (most recent call last):
File "encoder_timed.py", line 34, in y_callback
AttributeError: 'str' object has no attribute 'value'

`

@peterhinch
Copy link
Owner

I think you are passing strings as pin_x and pin_y constructor arguments. They should be Pin instances (and those pins should be configured as inputs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants