A wrapper module for reading analog values from GL55 series photoresistor sensor.
gl55.get_reading(data_pin, vcc_pin=None)
Get the input voltage of data_pin
in millivolt (mV). If vcc_pin
is defined it will first power on sensors and it will power off sensors at the end.
from sensors import gl55
volt_analog = gl55.get_reading('P18')
data_pin
: the analog input pin name where the sensor is connected to.vcc_pin
: (optional) the pin that controls the power to the sensors.