Demo Code for Light Commander
I'm a huge advocate of neatly-formatted programs. The attached demo is for the Light Commander which, I believe, is a little friendlier and easier to follow than the demos on the product page. Even the BS1 has binary number formatting which makes writing to the pins easy and obvious. I use that style in my template. I also move routines from the original code to subroutines that can be configured and called.