How to use the gpiozero.exc.PinError function in gpiozero

To help you get started, we’ve selected a few gpiozero examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github gpiozero / gpiozero / gpiozero / exc.py View on Github external
class PinInvalidEdges(PinError, ValueError):
    "Error raised when attempting to assign an invalid edge detection to a pin"

class PinInvalidBounce(PinError, ValueError):
    "Error raised when attempting to assign an invalid bounce time to a pin"

class PinSetInput(PinError, AttributeError):
    "Error raised when attempting to set a read-only pin"

class PinFixedPull(PinError, AttributeError):
    "Error raised when attempting to set the pull of a pin with fixed pull-up"

class PinEdgeDetectUnsupported(PinError, AttributeError):
    "Error raised when attempting to use edge detection on unsupported pins"

class PinUnsupported(PinError, NotImplementedError):
    "Error raised when attempting to obtain a pin interface on unsupported pins"

class PinSPIUnsupported(PinError, NotImplementedError):
    "Error raised when attempting to obtain an SPI interface on unsupported pins"

class PinPWMError(PinError):
    "Base class for errors related to PWM implementations"

class PinPWMUnsupported(PinPWMError, AttributeError):
    "Error raised when attempting to activate PWM on unsupported pins"

class PinPWMFixedValue(PinPWMError, AttributeError):
    "Error raised when attempting to initialize PWM on an input pin"

class PinUnknownPi(PinError, RuntimeError):
    "Error raised when gpiozero doesn't recognize a revision of the Pi"
github gpiozero / gpiozero / gpiozero / exc.py View on Github external
class InputDeviceError(GPIODeviceError):
    "Base class for errors specific to the InputDevice hierarchy"

class OutputDeviceError(GPIODeviceError):
    "Base class for errors specified to the OutputDevice hierarchy"

class OutputDeviceBadValue(OutputDeviceError, ValueError):
    "Error raised when ``value`` is set to an invalid value"

class PinError(GPIOZeroError):
    "Base class for errors related to pin implementations"

class PinInvalidFunction(PinError, ValueError):
    "Error raised when attempting to change the function of a pin to an invalid value"

class PinInvalidState(PinError, ValueError):
    "Error raised when attempting to assign an invalid state to a pin"

class PinInvalidPull(PinError, ValueError):
    "Error raised when attempting to assign an invalid pull-up to a pin"

class PinInvalidEdges(PinError, ValueError):
    "Error raised when attempting to assign an invalid edge detection to a pin"

class PinInvalidBounce(PinError, ValueError):
    "Error raised when attempting to assign an invalid bounce time to a pin"

class PinSetInput(PinError, AttributeError):
    "Error raised when attempting to set a read-only pin"

class PinFixedPull(PinError, AttributeError):
    "Error raised when attempting to set the pull of a pin with fixed pull-up"
github gpiozero / gpiozero / gpiozero / exc.py View on Github external
class GPIOPinMissing(GPIODeviceError, ValueError):
    "Error raised when a pin specification is not given"

class InputDeviceError(GPIODeviceError):
    "Base class for errors specific to the InputDevice hierarchy"

class OutputDeviceError(GPIODeviceError):
    "Base class for errors specified to the OutputDevice hierarchy"

class OutputDeviceBadValue(OutputDeviceError, ValueError):
    "Error raised when ``value`` is set to an invalid value"

class PinError(GPIOZeroError):
    "Base class for errors related to pin implementations"

class PinInvalidFunction(PinError, ValueError):
    "Error raised when attempting to change the function of a pin to an invalid value"

class PinInvalidState(PinError, ValueError):
    "Error raised when attempting to assign an invalid state to a pin"

class PinInvalidPull(PinError, ValueError):
    "Error raised when attempting to assign an invalid pull-up to a pin"

class PinInvalidEdges(PinError, ValueError):
    "Error raised when attempting to assign an invalid edge detection to a pin"

class PinInvalidBounce(PinError, ValueError):
    "Error raised when attempting to assign an invalid bounce time to a pin"

class PinSetInput(PinError, AttributeError):
    "Error raised when attempting to set a read-only pin"
github gpiozero / gpiozero / gpiozero / exc.py View on Github external
class OutputDeviceBadValue(OutputDeviceError, ValueError):
    "Error raised when ``value`` is set to an invalid value"

class PinError(GPIOZeroError):
    "Base class for errors related to pin implementations"

class PinInvalidFunction(PinError, ValueError):
    "Error raised when attempting to change the function of a pin to an invalid value"

class PinInvalidState(PinError, ValueError):
    "Error raised when attempting to assign an invalid state to a pin"

class PinInvalidPull(PinError, ValueError):
    "Error raised when attempting to assign an invalid pull-up to a pin"

class PinInvalidEdges(PinError, ValueError):
    "Error raised when attempting to assign an invalid edge detection to a pin"

class PinInvalidBounce(PinError, ValueError):
    "Error raised when attempting to assign an invalid bounce time to a pin"

class PinSetInput(PinError, AttributeError):
    "Error raised when attempting to set a read-only pin"

class PinFixedPull(PinError, AttributeError):
    "Error raised when attempting to set the pull of a pin with fixed pull-up"

class PinEdgeDetectUnsupported(PinError, AttributeError):
    "Error raised when attempting to use edge detection on unsupported pins"

class PinUnsupported(PinError, NotImplementedError):
    "Error raised when attempting to obtain a pin interface on unsupported pins"
github gpiozero / gpiozero / gpiozero / exc.py View on Github external
class OutputDeviceError(GPIODeviceError):
    "Base class for errors specified to the OutputDevice hierarchy"

class OutputDeviceBadValue(OutputDeviceError, ValueError):
    "Error raised when ``value`` is set to an invalid value"

class PinError(GPIOZeroError):
    "Base class for errors related to pin implementations"

class PinInvalidFunction(PinError, ValueError):
    "Error raised when attempting to change the function of a pin to an invalid value"

class PinInvalidState(PinError, ValueError):
    "Error raised when attempting to assign an invalid state to a pin"

class PinInvalidPull(PinError, ValueError):
    "Error raised when attempting to assign an invalid pull-up to a pin"

class PinInvalidEdges(PinError, ValueError):
    "Error raised when attempting to assign an invalid edge detection to a pin"

class PinInvalidBounce(PinError, ValueError):
    "Error raised when attempting to assign an invalid bounce time to a pin"

class PinSetInput(PinError, AttributeError):
    "Error raised when attempting to set a read-only pin"

class PinFixedPull(PinError, AttributeError):
    "Error raised when attempting to set the pull of a pin with fixed pull-up"

class PinEdgeDetectUnsupported(PinError, AttributeError):
    "Error raised when attempting to use edge detection on unsupported pins"
github gpiozero / gpiozero / gpiozero / exc.py View on Github external
class PinInvalidFunction(PinError, ValueError):
    "Error raised when attempting to change the function of a pin to an invalid value"

class PinInvalidState(PinError, ValueError):
    "Error raised when attempting to assign an invalid state to a pin"

class PinInvalidPull(PinError, ValueError):
    "Error raised when attempting to assign an invalid pull-up to a pin"

class PinInvalidEdges(PinError, ValueError):
    "Error raised when attempting to assign an invalid edge detection to a pin"

class PinInvalidBounce(PinError, ValueError):
    "Error raised when attempting to assign an invalid bounce time to a pin"

class PinSetInput(PinError, AttributeError):
    "Error raised when attempting to set a read-only pin"

class PinFixedPull(PinError, AttributeError):
    "Error raised when attempting to set the pull of a pin with fixed pull-up"

class PinEdgeDetectUnsupported(PinError, AttributeError):
    "Error raised when attempting to use edge detection on unsupported pins"

class PinUnsupported(PinError, NotImplementedError):
    "Error raised when attempting to obtain a pin interface on unsupported pins"

class PinSPIUnsupported(PinError, NotImplementedError):
    "Error raised when attempting to obtain an SPI interface on unsupported pins"

class PinPWMError(PinError):
    "Base class for errors related to PWM implementations"
github gpiozero / gpiozero / gpiozero / exc.py View on Github external
class PinInvalidBounce(PinError, ValueError):
    "Error raised when attempting to assign an invalid bounce time to a pin"

class PinSetInput(PinError, AttributeError):
    "Error raised when attempting to set a read-only pin"

class PinFixedPull(PinError, AttributeError):
    "Error raised when attempting to set the pull of a pin with fixed pull-up"

class PinEdgeDetectUnsupported(PinError, AttributeError):
    "Error raised when attempting to use edge detection on unsupported pins"

class PinUnsupported(PinError, NotImplementedError):
    "Error raised when attempting to obtain a pin interface on unsupported pins"

class PinSPIUnsupported(PinError, NotImplementedError):
    "Error raised when attempting to obtain an SPI interface on unsupported pins"

class PinPWMError(PinError):
    "Base class for errors related to PWM implementations"

class PinPWMUnsupported(PinPWMError, AttributeError):
    "Error raised when attempting to activate PWM on unsupported pins"

class PinPWMFixedValue(PinPWMError, AttributeError):
    "Error raised when attempting to initialize PWM on an input pin"

class PinUnknownPi(PinError, RuntimeError):
    "Error raised when gpiozero doesn't recognize a revision of the Pi"

class PinMultiplePins(PinError, RuntimeError):
    "Error raised when multiple pins support the requested function"
github gpiozero / gpiozero / gpiozero / exc.py View on Github external
class PinUnsupported(PinError, NotImplementedError):
    "Error raised when attempting to obtain a pin interface on unsupported pins"

class PinSPIUnsupported(PinError, NotImplementedError):
    "Error raised when attempting to obtain an SPI interface on unsupported pins"

class PinPWMError(PinError):
    "Base class for errors related to PWM implementations"

class PinPWMUnsupported(PinPWMError, AttributeError):
    "Error raised when attempting to activate PWM on unsupported pins"

class PinPWMFixedValue(PinPWMError, AttributeError):
    "Error raised when attempting to initialize PWM on an input pin"

class PinUnknownPi(PinError, RuntimeError):
    "Error raised when gpiozero doesn't recognize a revision of the Pi"

class PinMultiplePins(PinError, RuntimeError):
    "Error raised when multiple pins support the requested function"

class PinNoPins(PinError, RuntimeError):
    "Error raised when no pins support the requested function"

class PinInvalidPin(PinError, ValueError):
    "Error raised when an invalid pin specification is provided"

class GPIOZeroWarning(Warning):
    "Base class for all warnings in GPIO Zero"

class DistanceSensorNoEcho(GPIOZeroWarning):
    "Warning raised when the distance sensor sees no echo at all"
github gpiozero / gpiozero / gpiozero / exc.py View on Github external
class PinError(GPIOZeroError):
    "Base class for errors related to pin implementations"

class PinInvalidFunction(PinError, ValueError):
    "Error raised when attempting to change the function of a pin to an invalid value"

class PinInvalidState(PinError, ValueError):
    "Error raised when attempting to assign an invalid state to a pin"

class PinInvalidPull(PinError, ValueError):
    "Error raised when attempting to assign an invalid pull-up to a pin"

class PinInvalidEdges(PinError, ValueError):
    "Error raised when attempting to assign an invalid edge detection to a pin"

class PinInvalidBounce(PinError, ValueError):
    "Error raised when attempting to assign an invalid bounce time to a pin"

class PinSetInput(PinError, AttributeError):
    "Error raised when attempting to set a read-only pin"

class PinFixedPull(PinError, AttributeError):
    "Error raised when attempting to set the pull of a pin with fixed pull-up"

class PinEdgeDetectUnsupported(PinError, AttributeError):
    "Error raised when attempting to use edge detection on unsupported pins"

class PinUnsupported(PinError, NotImplementedError):
    "Error raised when attempting to obtain a pin interface on unsupported pins"

class PinSPIUnsupported(PinError, NotImplementedError):
    "Error raised when attempting to obtain an SPI interface on unsupported pins"
github gpiozero / gpiozero / gpiozero / exc.py View on Github external
class PinSPIUnsupported(PinError, NotImplementedError):
    "Error raised when attempting to obtain an SPI interface on unsupported pins"

class PinPWMError(PinError):
    "Base class for errors related to PWM implementations"

class PinPWMUnsupported(PinPWMError, AttributeError):
    "Error raised when attempting to activate PWM on unsupported pins"

class PinPWMFixedValue(PinPWMError, AttributeError):
    "Error raised when attempting to initialize PWM on an input pin"

class PinUnknownPi(PinError, RuntimeError):
    "Error raised when gpiozero doesn't recognize a revision of the Pi"

class PinMultiplePins(PinError, RuntimeError):
    "Error raised when multiple pins support the requested function"

class PinNoPins(PinError, RuntimeError):
    "Error raised when no pins support the requested function"

class PinInvalidPin(PinError, ValueError):
    "Error raised when an invalid pin specification is provided"

class GPIOZeroWarning(Warning):
    "Base class for all warnings in GPIO Zero"

class DistanceSensorNoEcho(GPIOZeroWarning):
    "Warning raised when the distance sensor sees no echo at all"

class SPIWarning(GPIOZeroWarning):
    "Base class for warnings related to the SPI implementation"