updated spark 1 and 2 for button and motion sensor