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

Use of arduino libraries for pin --> interrupt #8

Open
thigger opened this issue Dec 14, 2015 · 1 comment
Open

Use of arduino libraries for pin --> interrupt #8

thigger opened this issue Dec 14, 2015 · 1 comment

Comments

@thigger
Copy link

thigger commented Dec 14, 2015

LwRx was trying to use the wrong interrupt on my Pro Micro (32u4, like Arduino Leonardo). There's a function in the standard libraries to translate pins to interrupts so I've just bunged in this as a replacement for getIntNo and it works like a charm.

Thanks for the library BTW!

/**
   Get Int Number for a Pin
**/
int getIntNo(int pin) {

    return  digitalPinToInterrupt(pin);

}
@roberttidey
Copy link
Owner

Thanks. That's much cleaner. I have made that change in the repository.

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