Exemplo n.º 1
0
    def read(self, channel):
        '''
        Read the ratio between channel input voltage and power voltage (most time it's 3.3V).

        Args:
            channel (int): 0 - 7, specify the channel to read

        Returns:
            (int): the ratio, in 0.1%
        '''
        return CounterFitConnection.get_sensor_int_value(channel)
Exemplo n.º 2
0
 def light(self) -> int:
     '''
     Get the light strength value, maximum value is 1023
     '''
     return CounterFitConnection.get_sensor_int_value(self.__pin)
Exemplo n.º 3
0
 def get_distance(self):
     return CounterFitConnection.get_sensor_int_value(self.__address)
 def ReadUV(self):
     '''
     Read the IR light from the sensor
     '''
     return CounterFitConnection.get_sensor_int_value(self.__uv_pin)
 def ReadVisible(self):
     '''
     Read the visible light from the sensor
     '''
     return CounterFitConnection.get_sensor_int_value(self.__light_pin)