Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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 read temperature or light levels from sensors connected to GPIO pins to adjust content based on environmental conditions. 

...

In this example, we will associate GPIO ports 0, 1, 2, and 3 with switches connected to the GPIO output of GPIO events. GPIO ports 4, 5, and 6. Then the presentation can play the videos associated with each port when the switch is set to On (and turn the videos off when the port is set to Off) and return the player to the Home content6, and 7 will be connected to lights (outputs) that will get voltage from those ports when triggered by Advanced Commands associated with these ports. In this configuration, the presentation will play the videos trigger by inputs associated with the input ports. In addition to receiving inputs on GPIO 0, 1, 2, and 3, we will issue advanced commands that will turn on LEDs associated with GPIO ports 4, 5, 6, and 7. The main video will play until the user selects any of the three buttons associated with GPIOs 0, 1, or 2 in which case it will launch the associated content and the button associated with GPIO 3, that lets the user return to the main video, will be illuminated.

...

  1. Create a presentation with four videos, one main presentation video state and three secondary presentations video states (named “A”, “B”, and “C” in Image 1, above)

  2. Set GPIO pins 0-4 to Input and 4-7 to Output as shown in the image.

  3. Under the Events toolbar, select GPIO 0.

  4. Connect the GPIO 0 icon to the main content and then to the “A” contentvideo state. Do the same to connect GPIO 1 to the main content video state and the “B” contentvideo state, and GPIO 2 to the main content video state and “C” contentvideo state.

  5. Select the “A”, “B”, and “C” content video state in the sandbox and connect the GPIO 3 icon to all of them and then to the main contentvideo state.

  6. Select the main contentvideo state. In the State Properties pane on the right, add a GPIO command and set the Command Parameters to On and 4 1. Do the same for GPIO ports 5 2 and 6 3 as shown in Image 2, belowSet the Off command for the “A”, “B”, and “C” content. Select the “A” content and create GPIO commands as you did in the previous step, but now set the to Off.

  7. Select the “A” video state in the State Properties pane on the right, add GPIO commands for ports 4, 5, and 6, and set the Command Parameters to Off. Do the same for video states “B” and “C”.

  8. In the State Properties pane on the right, add a GPIO command and set the Command Parameters to On for GPIO port 7.

  9. Finally, associate GPIO 3 with GPIO 7 - Why?to turn on the light that indicates to the user that they can return to the home video by pressing GPIO 3.

...