Update documentation

This commit is contained in:
Konstantin Lampalzer 2021-09-12 13:46:58 +02:00
parent 527965ac0f
commit ccd46ee8a7
20 changed files with 623 additions and 543 deletions

View file

@ -0,0 +1,23 @@
.. _lib_display:
Display
*******
Class Documentation
====================
.. autoclass:: compLib.Display.Display
:members:
Examples
=========
Write a line to the display
---------------------------
.. code-block:: python
import time
from compLib.Display import Display
Display.write(1, "Hello World!")

View file

@ -0,0 +1,10 @@
.. _lib_encoder:
Encoder
*******
Class Documentation
====================
.. autoclass:: compLib.Encoder.Encoder
:members:

View file

@ -16,7 +16,5 @@ Testing analog sensors
from compLib import IRSensor
ir = IRSensor.IRSensor()
while True:
print ("left: {} middle: {} right: {}".format(ir.bottom_left_analog(), ir.bottom_middle_analog(), ir.bottom_right_analog()))
print ("left: {} middle: {} right: {}".format(IRSensor.read(1), IRSensor.read(3), IRSensor.read(5)))

View file

@ -19,5 +19,5 @@ Driving straight (maybe)
from compLib.Motor import Motor
for port in range(0, 4):
Motor.power(port, 50)
Motor.power(1, 50)
Motor.power(2, 50)