pynq.lib.button Module

The pynq.lib.rgbled module is a driver for reading values from onboard push-buttons and waiting for button-triggered events.

class pynq.lib.button.Button(device)[source]

Bases: object

This class controls the onboard push-buttons.


An object with appropriate Button methods


Read the current value of the button.


Wait for the button to be pressed or released.

Parameters:value (int) – 1 to wait for press or 0 to wait for release