This repository has been archived on 2025-06-01. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
compLIB/docs/source/other/usage.rst
Konstantin Lampalzer 00d6c54cdc
Fix usage example
2021-01-18 20:02:29 +01:00

28 lines
No EOL
480 B
ReStructuredText

.. _other_usage:
Usage
######
.. code-block:: python
import time
from compLib.Motor import *
def forward():
for port in range(0, 4):
Motor.power(port, 30);
def backward():
for port in range(0, 4):
Motor.power(port, -30);
def main():
print("hallo ich bin ein roboter beep buup")
forward()
time.sleep(1)
backward()
time.sleep(1)
if __name__ == '__main__':
main()