#include "svt.h" void Start() { OpenIR(); // Take control of IR LED } bool Run() { if( GetRemoteKeyStatus( KEY_HOME ) ) return false; //Scan state of IR key if (GetRemoteKeyStatus(KEY_INPUT1)==1) { SetIR(1);// Set IR on } else { SetIR(0);// Set IR off } { Sleep(100);// wait for 100ms } return true; } void End() { CloseIR(); }