Package org.openhab.io.gpio

Examples of org.openhab.io.gpio.GPIOPin.addEventHandler()


                    gpioPin.removeEventHandler(this);
                  }
                  gpioPin.setDirection(newDirection);
                  if (newDirection == GPIOPin.DIRECTION_IN) {
                    gpioPin.setEdgeDetection(GPIOPin.EDGEDETECTION_BOTH);
                    gpioPin.addEventHandler(this);
                  }
                }

                /* Debouncing is valid only for input pins */
                if (newDirection == GPIOPin.DIRECTION_IN) {
View Full Code Here


        }
      }

      /* The item is of type 'Contact', register for state change notifications */
      if (direction == GPIOPin.DIRECTION_IN) {
        gpioPin.addEventHandler(this);
      }
    } catch (Exception e) {
      logger.error("Error occured while creating backend object for item " +itemName + ", exception: "+ e.getMessage());
    }
  }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.