Package com.pi4j.io.gpio.exception

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


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


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

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

    @Override
    public PinMode getMode(GpioPin pin) {
        // ensure the requested pin has been provisioned
        if (!pins.contains(pin)) {
            throw new GpioPinNotProvisionedException(pin.getPin());
        }
        // return pin edge setting
        return pin.getMode();   
    }
View Full Code Here

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

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

    @Override
    public PinPullResistance getPullResistance(GpioPin pin) {
        // ensure the requested pin has been provisioned
        if (!pins.contains(pin)) {
            throw new GpioPinNotProvisionedException(pin.getPin());
        }
        // get pin pull resistance
        return pin.getPullResistance();
    }
View Full Code Here

            throw new IllegalArgumentException("Missing pin argument.");
        }
        for (GpioPin p : pin) {
            // ensure the requested pin has been provisioned
            if (!pins.contains(p)) {
                throw new GpioPinNotProvisionedException(p.getPin());
            }
            // set pin pull resistance
            if(!p.isPullResistance(resistance))
                return false;
        }
View Full Code Here

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

            throw new IllegalArgumentException("Missing pin argument.");
        }
        // ensure the requested pin has been provisioned
        for (GpioPinDigitalOutput p : pin) {
            if (!pins.contains(p)) {
                throw new GpioPinNotProvisionedException(p.getPin());
            }
            // set pin state low
            p.low();           
        }
    }
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.