Package com.pi4j.io.gpio.exception

Examples of com.pi4j.io.gpio.exception.GpioPinNotProvisionedException


            throw new IllegalArgumentException("Missing pin argument.");
        }
        for (GpioPinDigitalOutput p : pin) {
            // ensure the requested pin has been provisioned
            if (!pins.contains(p)) {
                throw new GpioPinNotProvisionedException(p.getPin());
            }
            // toggle pin state
            p.toggle();
        }
    }
View Full Code Here


            throw new IllegalArgumentException("Missing pin argument.");
        }
        for (GpioPinDigitalOutput p : pin) {
            // ensure the requested pin has been provisioned
            if (!pins.contains(p)) {
                throw new GpioPinNotProvisionedException(p.getPin());
            }   
            // toggle pin state
            p.pulse(milliseconds);
        }
    }
View Full Code Here

            throw new IllegalArgumentException("Missing pin argument.");
        }
        for (GpioPinDigitalOutput p : pin) {
            // ensure the requested pin has been provisioned
            if (!pins.contains(p)) {
                throw new GpioPinNotProvisionedException(p.getPin());
            }
            // set pin state
            p.setState(state);
        }
    }
View Full Code Here

    @Override
    public PinState getState(GpioPinDigital pin) {
        // ensure the requested pin has been provisioned
        if (!pins.contains(pin)) {
            throw new GpioPinNotProvisionedException(pin.getPin());
        }
        // return pin state
        return pin.getState();
    }   
View Full Code Here

            throw new IllegalArgumentException("Missing pin argument.");
        }
        for (GpioPinAnalogOutput p : pin) {
            // ensure the requested pin has been provisioned
            if (!pins.contains(p)) {
                throw new GpioPinNotProvisionedException(p.getPin());
            }
            // set pin PWM value
            p.setValue(value);
        }       
    }
View Full Code Here

            throw new IllegalArgumentException("Missing pin argument.");
        }
        for (GpioPinInput p : pin) {
            // ensure the requested pin has been provisioned
            if (!pins.contains(p)) {
                throw new GpioPinNotProvisionedException(p.getPin());       
            }
            p.addListener(listener);
        }
    }
View Full Code Here

            throw new IllegalArgumentException("Missing pin argument.");
        }
        for (GpioPinInput p : pin) {
            // ensure the requested pin has been provisioned
            if (!pins.contains(p)) {
                throw new GpioPinNotProvisionedException(p.getPin());
            }
            p.removeListener(listener);
        }
    }
View Full Code Here

            throw new IllegalArgumentException("Missing pin argument.");
        }
        for (GpioPinInput p : pin) {
            // ensure the requested pin has been provisioned
            if (!pins.contains(p)) {
                throw new GpioPinNotProvisionedException(p.getPin());
            }
            p.addTrigger(trigger);
        }       
    }
View Full Code Here

            throw new IllegalArgumentException("Missing pin argument.");
        }
        for (GpioPinInput p : pin) {
            // ensure the requested pin has been provisioned
            if (!pins.contains(p)) {
                throw new GpioPinNotProvisionedException(p.getPin());
            }
            p.removeTrigger(trigger);
        }
    }
View Full Code Here

        for (int index = (pin.length-1); index >= 0; index--) {
            GpioPin p  = pin[index];
           
            // ensure the requested pin has been provisioned
            if (!pins.contains(p)) {
                throw new GpioPinNotProvisionedException(p.getPin());
            }
            // remove all listeners and triggers
            if (p instanceof GpioPinInput) {
                ((GpioPinInput)p).removeAllListeners();
                ((GpioPinInput)p).removeAllTriggers();
View Full Code Here

TOP

Related Classes of com.pi4j.io.gpio.exception.GpioPinNotProvisionedException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.