Hello Everyone,
I guess I need to preface this by saying that my coding knowledge is fairly poor - I've managed to get most of what I want by hacking bits together but I'm struggling to translate GPIO button presses into something I can use with the HTML5.
At the moment I've used some of the Demo code from - https://brightsign.atlassian.net/wiki/spaces/DOC/pages/370672359/BSControlPort
I'm now successfully getting inputs and triggering things based on the code below - but every GPIO pin triggers either the oncontroldown or oncontrolup - I'd like each pin to trigger something different if possible.
<script>
var bp900_gpio = new BSControlPort("BrightSign");
bp900_gpio.oncontroldown = function(e){
test.runondown();
}
bp900_gpio.oncontrolup = function(e){
test.runonup();
}
</script>
But I'm now struggling to figure out how to run things based on a specific button press, ideally I'd like to be able to use 5-6 different buttons to trigger various JS on the page.
Would anyone be kind enough to point me in the right direction in terms of how to trigger specific things based on different pins being triggered.