If motion occurs,then turn on switch