Update documentation

This commit is contained in:
Joel 2021-01-16 23:43:56 +01:00
parent 81875a2cc5
commit 0dbfc5fe6b
No known key found for this signature in database
GPG key ID: BDDDBECD0808290E
53 changed files with 18837 additions and 0 deletions

View file

@ -0,0 +1,23 @@
.. _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

@ -0,0 +1,25 @@
.. _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

@ -0,0 +1,7 @@
.. _lib_irsensor:
Infrared Sensor
================
.. autoclass:: compLib.IRSensor.IRSensor
:members:

View file

@ -0,0 +1,23 @@
.. _lib_motor:
Motor
######
Class Documentation
********************
.. autoclass:: compLib.Motor.Motor
:members:
Examples
*********
Driving straight (maybe)
=========================
.. code-block:: python
from compLib.Motor import Motor
for port in range(0, 4):
Motor.power(port, 50)

View file

@ -0,0 +1,7 @@
.. _lib_servo:
Servo
=====
.. autoclass:: compLib.Servo.Servo
:members: