jwhitehorn / pi_piper

Event driven Raspberry Pi GPIO programming in Ruby
BSD 2-Clause "Simplified" License
694 stars 71 forks source link

use bit operations to lightup bit counter diodes #2

Closed alphaone closed 11 years ago

alphaone commented 11 years ago

I fiddled around with the bitcounter example and found an approach that is easily extensible for 3 or more bits, by checking for single bits in the current sum to lightup the according diode.

jwhitehorn commented 11 years ago

Thank you for the contribution!

Sorry for not getting back to you sooner, I've been busy. I've been meaning to review this, but I just haven't gotten to it yet. I will look at this tonight.