Rewrite to use interrupt-driven wiringPi calls

Also, rewritten to use a single uint32_t to store the bits as they're being read in.