GrovePi
GrovePi copied to clipboard
Pinchange interrupts could do with tidying up
There are several things that use (or probably should use) pinchange interrupts;
dust sensor, flow sensor encoder ultrasonic read
They currently use a mix of polling, global pinchange PCINT2_vect, and pinchange on one pin (which only works on port 8). It would make sense for them all to sit on the global pinchange interrupts, PCINT2_vect & PCINT0_vect . I would suggest we use the https://github.com/GreyGnome/EnableInterrupt library, as that does all the pinchange for all pins magic and would make it quite easy to translate the existing code.
I can't fix this because I don't have dust sensor, encoder or flow sensor to test with.