Sensor module
- class Sensor.SensorTwoLeds(power_pin, control_pin, sig_1_pin, sig_2_pin)
Bases:
object
- read(sensor)
A method that outputs a sensor reading as a value
- Returns:
A value output from the LED sensor
- sees(sensor)
A method that outputs the color read by a sensor
Certain sensor output values are correlated with either black, gray, or white
- Returns:
Returns the color read by the individual sensor
- state()
A method that outputs a value for the two LED sensor object in accordance to the two individual sensors on an array
The output of the two individual sensors are tested to determine if the sensors are either over the line, off the line, or partially over the line
- Returns:
The state of the 2 LED sensor, either a color or condition