Code for stair lights controller