Lowered minimal battery voltage and added ir sensor example
This commit is contained in:
parent
0ddc8e6c74
commit
3101e56252
2 changed files with 17 additions and 2 deletions
|
@ -4,7 +4,7 @@ from compLib.LogstashLogging import Logging
|
||||||
BATTERY_CHANNEL = 2
|
BATTERY_CHANNEL = 2
|
||||||
BATTERY_COUNT = 2
|
BATTERY_COUNT = 2
|
||||||
BATTERY_MULTIPLIER = 3
|
BATTERY_MULTIPLIER = 3
|
||||||
BATTERY_MIN_VOLTAGE = 3.6
|
BATTERY_MIN_VOLTAGE = 3.4
|
||||||
BATTERY_MAX_VOLTAGE = 4.2
|
BATTERY_MAX_VOLTAGE = 4.2
|
||||||
|
|
||||||
adc = ADC()
|
adc = ADC()
|
||||||
|
|
|
@ -4,4 +4,19 @@ Infrared Sensor
|
||||||
****************
|
****************
|
||||||
|
|
||||||
.. autoclass:: compLib.IRSensor.IRSensor
|
.. autoclass:: compLib.IRSensor.IRSensor
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
|
Examples
|
||||||
|
=========
|
||||||
|
|
||||||
|
Testing analog sensors
|
||||||
|
-------------------------
|
||||||
|
|
||||||
|
.. code-block:: python
|
||||||
|
|
||||||
|
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()))
|
Reference in a new issue