Pinchange interrupts could do with tidying up
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 494
- Forks
- 472
- PR merge metrics
- No merged PRs in 30d
Description
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.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the dust sensor, flow sensor, encoder, and ultrasonic-read implementations, then compare their polling, global PCINT2_vect, and single-pin interrupt paths. Review the suggested EnableInterrupt library and determine how all four should use PCINT2_vect and PCINT0_vect; done means the implementations are consolidated and verified with the available sensor hardware.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- raspberry-pi
- Domain
- embedded-iot
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100