Add IRWrapper and change IRSensor logic
This commit is contained in:
parent
3101e56252
commit
e94d735e24
5 changed files with 235 additions and 17 deletions
22
docs/source/lib/IRWrapper.rst
Normal file
22
docs/source/lib/IRWrapper.rst
Normal file
|
@ -0,0 +1,22 @@
|
|||
.. _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()))
|
Reference in a new issue