Your Digital Media Has Never Looked So Good

 
blbrown
Topic Author
Posts: 2
Joined: Fri Feb 24, 2012 5:38 pm

GPIO Normally Closed Contacts

Fri Feb 24, 2012 6:01 pm

We are using handsets with a BrightSign HD1010 that have a magnetically activated reed switch. When the handset is hung up the switch is closed.

The BrightSign is controlled by a touch screen to select specific video to play. We want the video to stop when the handset is hung up. How do we set the BrightSign to respond to a contact OPEN rather than contact CLOSE?

Can this feature be added to the Presentation Properties with a check box to select NO/NC inputs (and outputs). We frequently use standard security system IR sensors for interactive applications and they usually have normally closed contacts. We can work around the problem with a relay but its a bit clunky!
Bruce
Mental Media
Australia
 
RokuLyndon

Re: GPIO Normally Closed Contacts

Fri Feb 24, 2012 7:02 pm

I'll put in a bug request.

This is something we can change in the autorun.brs script that you're using. A couple of lines changed would make it listen to the opposite behavior. I don't know which version of BrightAuthor you're using, but the things to change are similar. In the autorun.brs file that's published to the flash card look for the following.

1. For the gpio object there should be a line like this:

    BSP.gpioPort = CreateObject("roGpioControlPort")


Replace it with this:

    BSP.gpioPort = CreateObject("roControlPort", "BrightSign")



2. Then you might have line like this:

BA 2.3 or 2.4
Function MediaItemEventHandler(event As Object, stateData As Object) As Object

    if type(event) = "roGpioButton" then



Replace the if type line with this:

if type(event) = "roControlUp" then


With just those two changes, the unit will now listen for button up events intead of button down.
 
blbrown
Topic Author
Posts: 2
Joined: Fri Feb 24, 2012 5:38 pm

Re: GPIO Normally Closed Contacts

Fri Feb 24, 2012 7:59 pm

That works - thanks. I look forward to it appearing as a check box function in a future software release.
Bruce
Mental Media
Australia

Who is online

Users browsing this forum: No registered users and 2 guests