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
    def getVoltage5V() -> float:
        """
            Get the voltage of the 5V rail


            :returns: The controller 5V rail voltage value in Volts
        """
        return hal.getUserVoltage5V()
Exemple #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()
 def getVoltage5V() -> float:
     """Get the voltage of the 5V rail.
     
     :returns: The controller 5V rail voltage value in Volts
     """
     return hal.getUserVoltage5V()