Documentation

This commit is contained in:
Konstantin Lampalzer 2021-09-12 13:46:30 +02:00
parent 8f2944da71
commit cf4e88fd35
5 changed files with 3 additions and 75 deletions

View file

@ -1,23 +0,0 @@
.. _lib_battery:
Battery
********
Class Documentation
====================
.. autoclass:: compLib.Battery.Battery
:members:
Examples
=========
Printing percentage
--------------------
.. code-block:: python
from compLib.Battery import Battery
print(Battery.percent())

View file

@ -1,25 +0,0 @@
.. _lib_buzzer:
Buzzer
*******
Class Documentation
====================
.. autoclass:: compLib.Buzzer.Buzzer
:members:
Examples
=========
Turning buzzer on and off
--------------------------
.. code-block:: python
import time
from compLib.Buzzer import Buzzer
Buzzer.set(True)
time.sleep(1)
Buzzer.set(False)

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

@ -1,22 +0,0 @@
.. _lib_irwrapper:
Infrared Wrapper
****************
.. autoclass:: compLib.IRWrapper.IRWrapper
:members:
Examples
=========
Calibrating analog sensors
--------------------------
.. code-block:: python
from compLib import IRWrapper
ir = IRWrapper.IRWrapper()
ir.calibrate()
print("left {} middle {} right {}".format(ir.bottom_left_calibrated(), ir.bottom_middle_calibrated(), ir.bottom_right_calibrated()))

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)