PaulStoffregen / Encoder

Quadrature Encoder Library for Arduino
http://www.pjrc.com/teensy/td_libs_Encoder.html
540 stars 239 forks source link

Fix Zero and MKR1000 interrupts #13

Open hanyazou opened 7 years ago

hanyazou commented 7 years ago

I've found that interrupts do not work on my M0 and MKR1000. After some investigation I found that we can't call attachInterrupt() before setup() on MKR1000. Here is my fix. I tested this patch on my MKR1000.

This fix includes addition of new public method 'begin()'. This method is supposed to be called in the setup() by user though it will be called in read() implicitly.

ezhik1 commented 2 years ago

Related to #77; this solved my issue with the XIAO, thanks @hanyazou