void |
JPigpio.addCallback(GPIOListener listener) |
Calls a user supplied function (a callback) whenever the
specified GPIO edge is detected.
The user supplied callback receives three parameters, the GPIO,
the level, and the tick.
If a user callback is not specified a default tally callback is
provided which simply counts edges.
|
void |
Pigpio.addCallback(GPIOListener gpioListener) |
Not implemented
|
void |
PigpioSocket.addCallback(GPIOListener gpioListener) |
|
void |
GPIO.delay(long delay,
int type) |
|
long |
JPigpio.getCurrentTick() |
|
long |
Pigpio.getCurrentTick() |
|
long |
PigpioSocket.getCurrentTick() |
|
int |
GPIO.getDirection() |
|
int |
JPigpio.getPWMDutycycle(int gpio) |
Returns the PWM dutycycle being used on the GPIO.
For normal PWM the dutycycle will be out of the defined range
for the GPIO (see [*getPWMRange*]).
If a hardware clock is active on the GPIO the reported
dutycycle will be 500000 (500k) out of 1000000 (1M).
If hardware PWM is active on the GPIO the reported dutycycle
will be out of a 1000000 (1M).
|
int |
Pigpio.getPWMDutycycle(int gpio) |
Not implemented
|
int |
PigpioSocket.getPWMDutycycle(int gpio) |
|
int |
JPigpio.getPWMFrequency(int gpio) |
Returns the frequency of PWM being used on the GPIO.
Returns the frequency (in Hz) used for the GPIO.
For normal PWM the frequency will be that defined for the GPIO
by [*setPWMFrequency*].
If a hardware clock is active on the GPIO the reported frequency
will be that set by [*hardwareClock*].
If hardware PWM is active on the GPIO the reported frequency
will be that set by [*hardwarePWM*].
|
int |
Pigpio.getPWMFrequency(int gpio) |
Not implemented
|
int |
PigpioSocket.getPWMFrequency(int gpio) |
|
int |
JPigpio.getPWMRange(int gpio) |
Returns the range of PWM values being used on the GPIO.
If a hardware clock or hardware PWM is active on the GPIO
the reported range will be 1000000 (1M).
|
int |
Pigpio.getPWMRange(int gpio) |
Not implemented
|
int |
PigpioSocket.getPWMRange(int gpio) |
|
int |
JPigpio.getPWMRealRange(int gpio) |
Returns the real (underlying) range of PWM values being
used on the GPIO.
|
int |
Pigpio.getPWMRealRange(int gpio) |
Not implemented
|
int |
PigpioSocket.getPWMRealRange(int gpio) |
|
int |
JPigpio.getServoPulseWidth(int gpio) |
Returns the servo pulsewidth being used on the GPIO.
|
int |
Pigpio.getServoPulseWidth(int gpio) |
Not implemented
|
int |
PigpioSocket.getServoPulseWidth(int gpio) |
Not implemented
|
boolean |
GPIO.getValue() |
|
void |
JPigpio.gpioDelay(long delay) |
Delay for the specified number of microseconds
|
void |
JPigpio.gpioDelay(long delay,
int type) |
|
void |
Pigpio.gpioDelay(long delay) |
|
void |
PigpioSocket.gpioDelay(long delay) |
|
int |
JPigpio.gpioGetMode(int gpio) |
Retrieve the mode of the given gpio
|
int |
Pigpio.gpioGetMode(int pin) |
|
int |
PigpioSocket.gpioGetMode(int pin) |
|
void |
JPigpio.gpioInitialize() |
|
void |
Pigpio.gpioInitialize() |
|
void |
PigpioSocket.gpioInitialize() |
|
boolean |
JPigpio.gpioRead(int gpio) |
Retrieve the state of the gpio
|
boolean |
Pigpio.gpioRead(int pin) |
|
boolean |
PigpioSocket.gpioRead(int pin) |
|
void |
JPigpio.gpioServo(int gpio,
int pulseWidth) |
Starts (500-2500) or stops (0) servo pulses on the GPIO.
The selected pulsewidth will continue to be transmitted until
changed by a subsequent call to set_servo_pulsewidth.
The pulsewidths supported by servos varies and should probably
be determined by experiment.
|
void |
Pigpio.gpioServo(int gpio,
int pulseWidth) |
|
void |
PigpioSocket.gpioServo(int gpio,
int pulseWidth) |
|
void |
JPigpio.gpioSetAlertFunc(int gpio,
Alert alert) |
|
void |
Pigpio.gpioSetAlertFunc(int pin,
Alert alert) |
|
void |
PigpioSocket.gpioSetAlertFunc(int pin,
Alert gpioAlert) |
|
void |
JPigpio.gpioSetMode(int gpio,
int mode) |
Set the mode of the gpio
|
void |
Pigpio.gpioSetMode(int pin,
int mode) |
|
void |
PigpioSocket.gpioSetMode(int pin,
int mode) |
|
void |
JPigpio.gpioSetPullUpDown(int gpio,
int pud) |
|
void |
Pigpio.gpioSetPullUpDown(int pin,
int pud) |
|
void |
PigpioSocket.gpioSetPullUpDown(int pin,
int pud) |
|
void |
JPigpio.gpioShiftOut(int gpioData,
int gpioClock,
boolean clockLevel,
boolean bitOrder,
byte value) |
Shift out a byte of data to a given pin.
|
void |
JPigpio.gpioShiftOut(int gpioData,
int gpioClock,
boolean bitOrder,
byte value) |
Shift out a byte of data to a given pin.
|
void |
JPigpio.gpioShiftOut(GPIO gpioData,
GPIO gpioClock,
boolean clockLevel,
boolean bitOrder,
byte value) |
|
void |
JPigpio.gpioShiftOut(GPIO gpioData,
GPIO gpioClock,
boolean bitOrder,
byte value) |
|
void |
JPigpio.gpioTerminate() |
Terminate the usage of the pigpio interfaces.
|
void |
Pigpio.gpioTerminate() |
|
void |
PigpioSocket.gpioTerminate() |
|
long |
JPigpio.gpioTick() |
|
long |
Pigpio.gpioTick() |
|
long |
PigpioSocket.gpioTick() |
|
void |
JPigpio.gpioTrigger(int gpio,
long pulseLen,
boolean level) |
Set the specified gpio to the level specified by level for the duration (in micro-sec) specified
by pulseLen and then set the gpio back to not-level.
|
void |
Pigpio.gpioTrigger(int gpio,
long pulseLen,
boolean level) |
|
void |
PigpioSocket.gpioTrigger(int gpio,
long pulseLen,
boolean level) |
|
void |
JPigpio.gpioWrite(int gpio,
boolean value) |
Set the state of the gpio
|
void |
Pigpio.gpioWrite(int pin,
boolean value) |
|
void |
PigpioSocket.gpioWrite(int pin,
boolean value) |
|
long |
JPigpio.gpioxPulseAndWait(int outGpio,
int inGpio,
long waitDuration,
long pulseHoldDuration,
boolean pulseLow) |
Pulse a named pin and then wait for a response on a different pin.
|
long |
Pigpio.gpioxPulseAndWait(int outGpio,
int inGpio,
long waitDuration,
long pulseHoldDuration,
boolean pulseLow) |
|
long |
PigpioSocket.gpioxPulseAndWait(int outGpio,
int inGpio,
long waitDuration,
long pulseHoldDuration,
boolean pulseLow) |
Not implemented
|
void |
JPigpio.i2cClose(int handle) |
Closes the I2C device associated with handle.
|
void |
Pigpio.i2cClose(int handle) |
|
void |
PigpioSocket.i2cClose(int handle) |
|
int |
JPigpio.i2cOpen(int i2cBus,
int i2cAddr) |
Returns a handle (>=0) for the device at the I2C bus address.
i2c_flags:= 0, no flags are currently defined.
Normally you would only use the [*i2c_**] functions if
you are or will be connecting to the Pi over a network.
|
int |
Pigpio.i2cOpen(int i2cBus,
int i2cAddr) |
|
int |
PigpioSocket.i2cOpen(int i2cBus,
int i2cAddr) |
|
int |
JPigpio.i2cReadDevice(int handle,
byte[] data) |
Returns count bytes read from the raw device associated
with handle.
|
int |
Pigpio.i2cReadDevice(int handle,
byte[] data) |
|
int |
PigpioSocket.i2cReadDevice(int handle,
byte[] data) |
|
void |
JPigpio.i2cWriteDevice(int handle,
byte[] data) |
Writes the data bytes to the raw device associated with handle.
|
void |
Pigpio.i2cWriteDevice(int handle,
byte[] data) |
|
void |
PigpioSocket.i2cWriteDevice(int handle,
byte[] data) |
|
void |
JPigpio.notifyBegin(int handle,
int bits) |
Starts notifications on a handle.
The notification sends state changes for each GPIO whose
corresponding bit in bits is set.
|
void |
Pigpio.notifyBegin(int handle,
int bits) |
Not implemented
|
void |
PigpioSocket.notifyBegin(int handle,
int bits) |
|
void |
JPigpio.notifyClose(int handle) |
Stops notifications on a handle and releases the handle for reuse.
|
void |
Pigpio.notifyClose(int handle) |
Not implemented
|
void |
PigpioSocket.notifyClose(int handle) |
|
int |
JPigpio.notifyOpen() |
Returns a notification handle (>=0).
A notification is a method for being notified of GPIO state
changes via a pipe.
Pipes are only accessible from the local machine so this
function serves no purpose if you are using Python from a
remote machine.
|
int |
Pigpio.notifyOpen() |
Not implemented
|
int |
PigpioSocket.notifyOpen() |
|
void |
JPigpio.notifyPause(int handle) |
Pauses notifications on a handle.
Notifications for the handle are suspended until
[*notify_begin*] is called again.
|
void |
Pigpio.notifyPause(int handle) |
Not implemented
|
void |
PigpioSocket.notifyPause(int handle) |
|
void |
JPigpio.reconnect() |
Try reconnecting to pigpio.
|
void |
Pigpio.reconnect() |
Not implemented
|
void |
PigpioSocket.reconnect() |
|
void |
JPigpio.removeCallback(GPIOListener listener) |
Remove callback listener object from notification thread.
|
void |
Pigpio.removeCallback(GPIOListener cgpioListener) |
Not implemented
|
void |
PigpioSocket.removeCallback(GPIOListener gpioListener) |
|
void |
JPigpio.serialClose(int handle) |
Closes the serial device associated with handle.
|
void |
Pigpio.serialClose(int handle) |
Not implemented
|
void |
PigpioSocket.serialClose(int handle) |
|
int |
JPigpio.serialDataAvailable(int handle) |
Returns the number of bytes available to be read from the
device associated with handle.
|
int |
Pigpio.serialDataAvailable(int handle) |
Not implemented
|
int |
PigpioSocket.serialDataAvailable(int handle) |
|
int |
JPigpio.serialOpen(java.lang.String tty,
int baudRate,
int flags) |
Returns a handle for the serial tty device opened
at baud bits per second.
Normally you would only use the [*serial_**] functions if
you are or will be connecting to the Pi over a network.
|
int |
Pigpio.serialOpen(java.lang.String tty,
int baudRate,
int flags) |
Not implemented
|
int |
PigpioSocket.serialOpen(java.lang.String tty,
int baudRate,
int flags) |
|
byte[] |
JPigpio.serialRead(int handle,
int count) |
Reads up to count bytes from the device associated with handle.
The returned value is a tuple of the number of bytes read and a
bytearray containing the bytes.
|
byte[] |
Pigpio.serialRead(int handle,
int count) |
Not implemented
|
byte[] |
PigpioSocket.serialRead(int handle,
int count) |
|
byte |
JPigpio.serialReadByte(int handle) |
Returns a single byte from the device associated with handle.
|
byte |
Pigpio.serialReadByte(int handle) |
Not implemented
|
byte |
PigpioSocket.serialReadByte(int handle) |
|
void |
JPigpio.serialWrite(int handle,
byte[] data) |
Writes the data bytes to the device associated with handle.
|
void |
Pigpio.serialWrite(int handle,
byte[] data) |
Not implemented
|
void |
PigpioSocket.serialWrite(int handle,
byte[] data) |
|
void |
JPigpio.serialWriteByte(int handle,
byte data) |
Writes a single byte to the device associated with handle.
|
void |
Pigpio.serialWriteByte(int handle,
byte data) |
Not implemented
|
void |
PigpioSocket.serialWriteByte(int handle,
byte data) |
|
void |
GPIO.setAlert(Alert alert) |
|
void |
JPigpio.setDebug(boolean flag) |
|
void |
PigpioSocket.setDebug(boolean flag) |
Not implemented
|
void |
GPIO.setDirection(int direction) |
|
void |
GPIO.setPulldown(int pulldown) |
|
void |
JPigpio.setPWMDutycycle(int gpio,
int dutycycle) |
Starts (non-zero dutycycle) or stops (0) PWM pulses on the GPIO.
|
void |
Pigpio.setPWMDutycycle(int gpio,
int dutycycle) |
|
void |
PigpioSocket.setPWMDutycycle(int gpio,
int dutycycle) |
|
int |
JPigpio.setPWMFrequency(int gpio,
int frequency) |
Sets the frequency (in Hz) of the PWM to be used on the GPIO.
Returns the frequency actually set.
|
int |
Pigpio.setPWMFrequency(int gpio,
int frequency) |
Not implemented
|
int |
PigpioSocket.setPWMFrequency(int gpio,
int frequency) |
|
void |
JPigpio.setPWMRange(int gpio,
int range) |
Sets the range of PWM values to be used on the GPIO.
|
void |
Pigpio.setPWMRange(int gpio,
int range) |
Not implemented
|
void |
PigpioSocket.setPWMRange(int gpio,
int range) |
|
void |
JPigpio.setServoPulseWidth(int gpio,
int pulseWidth) |
|
void |
Pigpio.setServoPulseWidth(int gpio,
int pulseWidth) |
|
void |
PigpioSocket.setServoPulseWidth(int gpio,
int pulseWidth) |
|
void |
GPIO.setValue(boolean value) |
|
void |
GPIO.setValue(int value) |
|
void |
JPigpio.setWatchdog(int userGpio,
int timeout) |
Sets a watchdog timeout for a GPIO.
The watchdog is nominally in milliseconds.
Only one watchdog may be registered per GPIO.
The watchdog may be cancelled by setting timeout to 0.
If no level change has been detected for the GPIO for timeout
milliseconds any notification for the GPIO has a report written
to the fifo with the flags set to indicate a watchdog timeout.
The callback class interprets the flags and will
call registered notificationListeners for the GPIO with level TIMEOUT.
|
void |
Pigpio.setWatchdog(int userGpio,
int timeout) |
Not implemented
|
void |
PigpioSocket.setWatchdog(int userGpio,
int timeout) |
|
void |
JPigpio.spiClose(int handle) |
Closes the SPI device associated with handle.
|
void |
Pigpio.spiClose(int handle) |
|
void |
PigpioSocket.spiClose(int handle) |
|
int |
JPigpio.spiOpen(int channel,
int baudRate,
int flags) |
Returns a handle for the SPI device on channel.
|
int |
Pigpio.spiOpen(int channel,
int baudRate,
int flags) |
|
int |
PigpioSocket.spiOpen(int spiChannel,
int spiBaudRate,
int flags) |
|
int |
JPigpio.spiRead(int handle,
byte[] data) |
Reads count bytes from the SPI device associated with handle.
The returned value is a tuple of the number of bytes read and a
bytearray containing the bytes.
|
int |
Pigpio.spiRead(int handle,
byte[] data) |
|
int |
PigpioSocket.spiRead(int handle,
byte[] data) |
|
int |
JPigpio.spiWrite(int handle,
byte[] data) |
Writes the data bytes to the SPI device associated with handle.
|
int |
Pigpio.spiWrite(int handle,
byte[] data) |
|
int |
PigpioSocket.spiWrite(int handle,
byte[] data) |
|
int |
JPigpio.spiXfer(int handle,
byte[] txData,
byte[] rxData) |
Writes the data bytes to the SPI device associated with handle,
returning the data bytes read from the device.
The returned value is a tuple of the number of bytes read and a
bytearray containing the bytes.
|
int |
Pigpio.spiXfer(int handle,
byte[] txData,
byte[] rxData) |
|
int |
PigpioSocket.spiXfer(int handle,
byte[] txData,
byte[] rxData) |
|
int |
JPigpio.waveAddGeneric(java.util.ArrayList<Pulse> pulses) |
Adds a list of pulses to the current waveform.
Returns the new total number of pulses in the current waveform.
The pulses are interleaved in time order within the existing
waveform (if any).
Merging allows the waveform to be built in parts, that is the
settings for GPIO#1 can be added, and then GPIO#2 etc.
If the added waveform is intended to start after or within
the existing waveform then the first pulse should consist
solely of a delay.
|
int |
Pigpio.waveAddGeneric(java.util.ArrayList<Pulse> pulses) |
Not implemented
|
int |
PigpioSocket.waveAddGeneric(java.util.ArrayList<Pulse> pulses) |
|
void |
JPigpio.waveAddNew() |
Starts a new empty waveform.
You would not normally need to call this function as it is
automatically called after a waveform is created with the
[*wave_create*] function.
|
void |
Pigpio.waveAddNew() |
Not implemented
|
void |
PigpioSocket.waveAddNew() |
|
int |
JPigpio.waveAddSerial(int gpio,
int baud,
byte[] data,
int offset,
int bbBits,
int bbStop) |
Adds a waveform representing serial data to the existing
waveform (if any).
|
int |
Pigpio.waveAddSerial(int userGpio,
int baud,
byte[] data,
int offset,
int bbBits,
int bbStop) |
Not implemented
|
int |
PigpioSocket.waveAddSerial(int userGpio,
int baud,
byte[] data,
int offset,
int bbBits,
int bbStop) |
|
void |
JPigpio.waveClear() |
This function clears all waveforms and any data added by calls to the wave_add_* functions.
|
void |
Pigpio.waveClear() |
Not implemented
|
void |
PigpioSocket.waveClear() |
|
int |
JPigpio.waveCreate() |
Creates a waveform from the data provided by the prior calls
to the [*wave_add_**] functions.
Returns a wave id (>=0) if OK, otherwise PI_EMPTY_WAVEFORM,
PI_TOO_MANY_CBS, PI_TOO_MANY_OOL, or PI_NO_WAVEFORM_ID.
The data provided by the [*wave_add_**] functions is consumed by
this function.
As many waveforms may be created as there is space available.
|
int |
Pigpio.waveCreate() |
Not implemented
|
int |
PigpioSocket.waveCreate() |
|
void |
JPigpio.waveDelete(int waveId) |
This function deletes the waveform with id wave_id.
Wave ids are allocated in order, 0, 1, 2, etc.
|
void |
Pigpio.waveDelete(int waveId) |
Not implemented
|
void |
PigpioSocket.waveDelete(int waveId) |
|
int |
JPigpio.waveSendOnce(int waveId) |
Transmits the waveform with id wave_id.
|
int |
Pigpio.waveSendOnce(int waveId) |
Not implemented
|
int |
PigpioSocket.waveSendOnce(int waveId) |
|
int |
JPigpio.waveSendRepeat(int waveId) |
Transmits the waveform with id wave_id.
|
int |
Pigpio.waveSendRepeat(int waveId) |
Not implemented
|
int |
PigpioSocket.waveSendRepeat(int waveId) |
|
boolean |
JPigpio.waveTxBusy() |
Returns 1 if a waveform is currently being transmitted,
otherwise 0.
|
boolean |
Pigpio.waveTxBusy() |
Not implemented
|
boolean |
PigpioSocket.waveTxBusy() |
|
int |
JPigpio.waveTxStop() |
Stops the transmission of the current waveform.
This function is intended to stop a waveform started with
wave_send_repeat.
|
int |
Pigpio.waveTxStop() |
Not implemented
|
int |
PigpioSocket.waveTxStop() |
|