Home Contents | # gpio.watch | Gpio | Core4 Lua Event System

## SYNOPSIS

#include <lua/gpio.lh>
gpio.watch([group, ]nr, state)

## DESCRIPTION

Configures pin change notifications for the input nr.

The value state indicates which events are to be reported: 0=none, 1=rising, 2=falling, 3=both.

Events are reported using the callback registered with gpio.new().

## SEE ALSO

gpio.new, gpio.register