Time.sleep | Robot Mesh

My current team is trying to implement this for an automated section of our robot:

         motor2.spin(vex.DirectionType.FWD, 50, vex.VelocityUnits.PCT)
         time.sleep(3)
         motor2.spin(vex.DirectionType.FWD, 0, vex.VelocityUnits.PCT)

The goal was to move a motor a certain direction for 3 seconds and are trying to test it.

However, it keeps getting caught up on time.sleep. Does Robot Mesh not allow users to import libraries like time and if so, what alternatives are (or aren’t) available?


Thanks!

Use sys.sleep(3)

If you have any other questions the API is here:
https://store.robotmesh.com/docs/vexv5-python/html/namespacesys.html#a51c414d52c9d790de971c45aef1fdee4

3 Likes