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