Example 2 Going Backwards Using motor ===================================== Simulator --------- .. image:: ../tutorial/code2.gif :alt: not found :align: center Real Life --------- .. image:: ../tutorial/code2real.gif :alt: not found :align: center What does the code do? ---------------------- In this code, the robot moves backward for 1200 ms at 100% speed. Functions Used -------------- motor( motor port, speed) msleep( distance in ms) Function Implementation *********************** .. code-block:: python :linenos: #!/usr/bin/python3 import os, sys sys.path.append("/usr/lib") from kipr import* def main(): motor(0, -100) motor(3, -100) msleep(1200) if __name__ == "__main__": main() Rookie Tips ----------- By using negative numbers, you can make the robot go backwards!