3 ms·
I can't really come up with any good illustrations for something complex off the top of my head, so I'll go for a really simple one. In fact, that's part of its
by btschaegg 4y ago
I can't really come up with any good illustrations for something complex off the top of my head, so I'll go for a really simple one. In fact, that's part of its beauty.
When I had to deal with the signals from a rotary encoder the first time (being a programmer with two left hands and zero hardware affinity), I had a look at a couple of C libraries but didn't have the patience to slog through their implementations in order to understand what signals they were decoding.
...until I saw this: https://github.com/PaulStoffregen/Encoder/blob/master/Encoder.h#L162 https://github.com/PaulStoffregen/Encoder/blob/master/Encode...
I'm not sure if it was this exact library, but that's the comment I saw. Nice and obvious, in contrast to all the obscure attempts to convey what was happening all the other libs made through prose comments.