updated programme with loads of improved logic, and included new wiringpi2 method of activating lights (old driver broke with kernel update)