Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Expand
titleTable of Contents
Table of Contents

This object provides support for the BP200/BP900 USB button boards and GPIO ports. Button presses are returned as oncontroldown and oncontrolup events. The object is used to configure output levels on the I/O connector and monitor inputs. Typically, LEDs and buttons are attached to the GPIO connector on the BrightSign player or the BrightSign Expansion Module.

The JavaScript equivalent is controlport.

Object Creation

The roControlPort object is created with a single parameter that specifies the port being used.

...

Since multiple BP200/BP900 button boards can be connected to a player simultaneously, the <n> value specifies the port enumeration of each board. This value corresponds to the <raw> or <fid> value returned by the roDeviceInfo.GetUSBTopology()method. An unspecified enumeration value is synonymous with a button board with an enumeration value of 0 (e.g. Touchboard-GPIO and Touchboard-0-GPIO are identical).

Methods

Tip

See here for a table of pins and corresponding buttons for the onboard GPIO connector.

...

Configures buttons on a BP200/BP900 button board.This method can only be used when the BSControlPort object is instantiated with the Touchboard-<n>-LED-SETUP or Touchboard-<n>-LED parameter.The parameters are integer values.

Events

The following events are available on the BSControlPort object. Each event can receive a ControlPortEvent event.

  • oncontroldown

  • oncontrolup

  • oncontrolevent

ControlPortEvent – Attributes

  • readonly attribute unsigned long code

Examples

The following example code configures four GPIO outputs:

...