def get(self):
        """Get the current reading of the potentiometer.

        :returns: The current position of the potentiometer.
        :rtype: float
        """
        return (self.analog_input.getVoltage() / hal.getUserVoltage5V()) * self.fullRange + self.offset
    def get(self):
        """Get the current reading of the potentiometer.

        :returns: The current position of the potentiometer.
        :rtype: float
        """
        return (self.analog_input.getVoltage() / hal.getUserVoltage5V()) * self.fullRange + self.offset
예제 #3
0
    def getVoltage5V() -> float:
        """
            Get the voltage of the 5V rail


            :returns: The controller 5V rail voltage value in Volts
        """
        return hal.getUserVoltage5V()
예제 #4
0
 def getVoltage5V():
     """
         Get the voltage of the 5V rail
         
         :returns: The controller 5V rail voltage value in Volts
         :rtype: float
     """
     return hal.getUserVoltage5V()
예제 #5
0
 def getVoltage5V() -> float:
     """Get the voltage of the 5V rail.
     
     :returns: The controller 5V rail voltage value in Volts
     """
     return hal.getUserVoltage5V()