GPIO (General Purpose Input/Output) pins allow you to connect devices like buttons or sensors to your BrightSign player to control presentation content. They are unique because they can be configured as either inputs to read signals from external devices or outputs to send power to external devices. For example, they can be used to trigger video playback when a button that is connected to a GPIO pin is pressed, or to perform actions based on temperature or light level sensor triggers connected to GPIO pins to adjust content based on environmental conditions.
How to Configure GPIO
GPIO pins allow you to trigger content changes on the player based on input, or send advanced commands to change the state of the player GPIO switches and connected devices to on or off. The GPIO pins, which deliver about 3.3v 24mA*, are ideal for lights, sensors, or buttons. Seehttps://docs.brightsign.biz/space/DOC/2264432656/Connect+the+Player+GPIO for more information on configuring your player hardware and external devices for GPIO.
To use GPIO functionality in BrightAuthor:connected:
Define which GPIO pins are used as inputs or outputs. This is set under the Presentation Settings > Connectors menu.
When GPIO is set to input, the connected device should be a contact closure type switch/relay, completing a circuit between the GPIO button pin and Ground, so that when a switch is pressed, something happens.
GPIO ports that are set to output only have digital output.
Set up event triggers to specify what actions should occur when a specific GPIO pin receives a signal. See GPIO Event, and GPIOfor more information.
Example
In this example, we will use BrightAuthor:connected to set up the player to receive input from buttons connected to GPIO ports 0, 1, 2, and 3 and we will issue commands that will turn on LEDs associated with GPIO ports 4, 5, 6, and 7 based on the video states. The main video will play until the user selects any of the three illuminated buttons associated with GPIOs 4, 5, or 6. In that case, the presentation will launch the associated video state, turn off the current LED buttons, and turn on the LED for the button that lets the user return to the main video.
Create an Advanced (Interactive) presentation with four videos, one main video state and three secondary video states (named “A”, “B”, and “C” in Image 1, above)
In Presentation Settings > Interactive > Connectors, set GPIO pins 0-4 to Input and 4-7 to Output as shown in the image.
Under the Events toolbar, select GPIO 0.
Connect the GPIO 0 icon to the main video state and then to the “A” video state. Do the same to connect GPIO 1 to the main video state and the “B” video state, and GPIO 2 to the main video state and “C” video state.
Select the “A”, “B”, and “C” video state in the sandbox and connect the GPIO 3 icon to all of them and then back to the main video state. Now your inputs are set up and we will set up the outputs/voltage.
Select the main video state. In State Properties > Advanced:
Add an Entry Command. Select GPIO from the dropdown menu and set the Command Parameters to On and 4.
Do the same for GPIO ports 5 and 6 as shown in Image 2, below.
Add an Entry Command. Select GPIO from the dropdown menu and set the Command Parameters to Off and 7.
Select the “A” video state. In State Properties > Advanced:
Add an Entry Command. Select GPIO from the dropdown menu and set the Command Parameters to Off and 4.
Do the same for GPIO ports 5 and 6.
Add an Entry Command and set the Command Parameters to On and 7 (so the user can return to the home video by pressing that illuminated LED when the “A” video is playing).
Repeat these steps for video states “B” and “C”.
__________________________________________________________________________________________
* HS5, LS5, HD5, XD5 and XT5 players prior to Rev G deliver less than 3.3 volts.