Hi Andrew,
Assuming that the GPIO 10 returns 1 when the projector is on and 0 when it is off, I can confirm that the above code should work.
Best Regards,
------------------------------
Altaz Daruwala
Ross Video
------------------------------
Original Message:
Sent: 10-02-2023 17:28
From: Andrew Diggins
Subject: GPIO state reading
Hi Altaz
Thank you very much for the reply..So would this work
if (event.getState && event.getState() != 1) { //turn on projector }if (event.getState && event.getState() != 0) { //turn off projector }
------------------------------
Andrew Diggins
Engineer
Kinly
Original Message:
Sent: 10-02-2023 15:58
From: Altaz Daruwala
Subject: GPIO state reading
Hi Andrew,
An example of how you can put the state in an if statement can be:
if (event.getState && event.getState() != null) { //Do the thing }
Hope this helps.
Best Regards,
------------------------------
Altaz Daruwala
Ross Video
Original Message:
Sent: 09-28-2023 16:39
From: Andrew Diggins
Subject: GPIO state reading
Hi
I have a custom panel with a button that is triggered by GPIO 10, when the GPIO is On i what it to turn on the projector and when the GPIO is off turn off the projector. What i need help with is editing the example script below to suit my requirement as in put the state into a varable to use in an if statement

------------------------------
Andrew Diggins
Engineer
Kinly
------------------------------