mirror of
https://github.com/KevinMidboe/python-gpiozero.git
synced 2025-10-29 17:50:37 +00:00
Merge pull request #308 from SteveAmor/master
Corrected value of capacitor used in LightSensor
This commit is contained in:
@@ -418,7 +418,7 @@ class LightSensor(SmoothedInputDevice):
|
|||||||
Extends :class:`SmoothedInputDevice` and represents a light dependent
|
Extends :class:`SmoothedInputDevice` and represents a light dependent
|
||||||
resistor (LDR).
|
resistor (LDR).
|
||||||
|
|
||||||
Connect one leg of the LDR to the 3V3 pin; connect one leg of a 1µf
|
Connect one leg of the LDR to the 3V3 pin; connect one leg of a 1µF
|
||||||
capacitor to a ground pin; connect the other leg of the LDR and the other
|
capacitor to a ground pin; connect the other leg of the LDR and the other
|
||||||
leg of the capacitor to the same GPIO pin. This class repeatedly discharges
|
leg of the capacitor to the same GPIO pin. This class repeatedly discharges
|
||||||
the capacitor, then times the duration it takes to charge (which will vary
|
the capacitor, then times the duration it takes to charge (which will vary
|
||||||
@@ -443,7 +443,7 @@ class LightSensor(SmoothedInputDevice):
|
|||||||
:param float charge_time_limit:
|
:param float charge_time_limit:
|
||||||
If the capacitor in the circuit takes longer than this length of time
|
If the capacitor in the circuit takes longer than this length of time
|
||||||
to charge, it is assumed to be dark. The default (0.01 seconds) is
|
to charge, it is assumed to be dark. The default (0.01 seconds) is
|
||||||
appropriate for a 0.01µf capacitor coupled with the LDR from the
|
appropriate for a 1µF capacitor coupled with the LDR from the
|
||||||
`CamJam #2 EduKit`_. You may need to adjust this value for different
|
`CamJam #2 EduKit`_. You may need to adjust this value for different
|
||||||
valued capacitors or LDRs.
|
valued capacitors or LDRs.
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user