I'd go for the interrupt setup like @SimonGAndrews shows. You will get a better overall behavior than you get with polling, especially when you plan to do also additional things in our application. First it may look more complicated, but in the end it will be much simpler. You obviously still have to do a comparison what has changed since you always get all bits back.
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
@bertjerred,
I'd go for the interrupt setup like @SimonGAndrews shows. You will get a better overall behavior than you get with polling, especially when you plan to do also additional things in our application. First it may look more complicated, but in the end it will be much simpler. You obviously still have to do a comparison what has changed since you always get all bits back.