0

Receiving GPIO Events with Javascript

Hello,

I'm using a HD 222 for displaying a webpage hosted on our server. I created a new project in brightauthor with an external php page that gets loaded on startup. I also created a gpio event for button 0 onDown and remain in current state. Is there a way to receive this event from javascript/html5 inside my webpage or how can I send this event to the specified page?

Thanks in advance

marcel

 




Screenshot_2.png

2 comments

  • 0
    Avatar
    Romeo

    Hi,

    You would need a plugin for this. I've attached an example that processes Keyboard events and sends those events as messages to the HTML page using m.bsp.sign.zoneshsm[1].loadinghtmlwidget.PostJSMessage({ TagValue: m.usbinput$}).

    You would need to modify that plugin to process GPIO events instead.

     

    Regards,

    Romeo

     

  • 0
    Avatar
    brandon

    Romeo, I'm not seeing an attachment here. Are you able to respond and relink it? 

    I'm needing to do something similar to Marcel. Creating a simple html/javascript game that should receive input from buttons connected to the gpio port of the brightsign xt1144. I also need to capture that input as a variable and use it to determine the next steps of the game.

    Any help is much appreciated.

    Best,

    Brandon

Please sign in to leave a comment.