Tweaked ser.write() statement
oops
Added option for motion detection