Hello Everyone, HELP ! Its driving me insane!
I am trying to automate screen control with the GPIO pins on a Codec Pro.
I can get the screen to go up and down by changing the setting in GPIO with Output Standby Active.
I have this set on Pin 4 to have the screen go up when the system goes into standby.
There isnt an opposite one in the standard settings. So I am trying to write some API that will put the screen down on GPIO pin 3 when the system is Active.
I have had any luck. I have also set pin 3 to manual state.
This is the most recent attempt.
import xapi from 'xapi';
function standbyChanged(sbyState) {
if(sbyState === 'Standby') {
xapi.Config.GPIO.Pin[4].Mode.set('Low');
xapi.Config.GPIO.Pin[3].Mode.set('High');
}
else if(sbyState === "Off") {
xapi.Config.GPIO.Pin[4].Mode.set('High');
xapi.Config.GPIO.Pin[3].Mode.set('Low');
}
}
xapi.Status.Standby.State.on(standbyChanged);