Documentation
This commit is contained in:
parent
2cac75fc9c
commit
3b18b0a66c
4 changed files with 44 additions and 11 deletions
28
docs/source/other/usage.rst
Normal file
28
docs/source/other/usage.rst
Normal file
|
@ -0,0 +1,28 @@
|
|||
.. _other_usage:
|
||||
|
||||
Usage
|
||||
######
|
||||
|
||||
.. code-block:: python
|
||||
|
||||
import time
|
||||
from compLib.Motor import *
|
||||
|
||||
def forward():
|
||||
for port in range(0, 3):
|
||||
Motor.power(port, 30);
|
||||
|
||||
def backward():
|
||||
for port in range(0, 3):
|
||||
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()
|
Reference in a new issue