beautypg.com

Wavetronix Click 500 (programmable controller) (CLK-500) - Developer Guide User Manual

Page 105

background image

104

CHAPTER 9 • DIGITAL INPUT/OUTPUT

break;

case GREEN_INDICATION:
SignalLightState = YELLOW_INDICATION;
ClickDioSet(D1, 0);
ClickDioSet(D2, 1);
ClickLedOff(RED1);
ClickLedOn(YELLOW1);
ClickUtilTimerSet(&SignalLightTimer,
TIME_YELLOW_MS);
break;

case YELLOW_INDICATION:
SignalLightState = RED_INDICATION;
ClickDioSet(D1, 1);
ClickDioSet(D2, 0);
ClickLedOn(RED1);
ClickLedOff(YELLOW1);
ClickUtilTimerSet(&SignalLightTimer,
TIME_RED_MS);

default:
}
}