Package eu.hansolo.galileo.Pin

Examples of eu.hansolo.galileo.Pin.Value


     * @param PIN
     * @return the current value of the given Pin
     */
    public Value getDigital(final Digital PIN) {               
        initPin(PIN, Direction.IN);
        Value value = Value.LOW;       
        try (FileInputStream in = new FileInputStream("/sys/class/gpio/gpio" + PIN.gpio + "/value")) {
            value = in.read() == 1 ? Value.HIGH : Value.LOW;
        } catch (IOException exception) {
            System.out.println(exception);
        }       
View Full Code Here

TOP

Related Classes of eu.hansolo.galileo.Pin.Value

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.