Code for rotating laser