Instructions Circuit Diagram

- 80 -
vFrontLEDs(LEFT);
This function will activate YETI’s left eye LED.
Equivalent functions are:
vFrontLEDs(RIGHT);
Activating YETI’s right eye.
vFrontLEDs(OFF);
Switches off both eyes.
vFrontLEDs(BOTH);
Switches on both eyes
Blinking YETI’s right eye LED 5 times
#This program will activate YETI’s right eye LED 5 times at one
second intervals
#include“YETI.h” //loaddenitionsand
//functions
int main(void){ //main function entry
inti;  //denevariable‘i’asaninteger
vInitYeti(); //initialize all microprocessor
//modules in the YETI
for(i=0 ;i<5 ;i++){ //repeat for-loop (5 times)
vFrontLEDs(RIGHT); //activate YETI’s right eye LED
vWaitMilliseconds(500); //wait half a second
vFrontLEDs(OFF); //deactivate YETI’s right eye LED
vWaitMilliseconds(500); //wait half a second
} //terminate for-loop (5 times)
return 0; //terminating the main function
} //end of the main function