Added code for two digital input switches.