![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/4/44/44414c02-d064-4424-ae12-8acc58561d02/44414c02-d064-4424-ae12-8acc58561d02-bg57.png)
iVIEW-100 Series user’s Manual, 2006, v2.0 ----- 87
diR[6] char To store the Di Read respond value.
For ‘&’ with DiCT value to decide which
Di light is ON or OFF.
doT[7] char To store the command send to control
the Do lights.
tt char A temporary storage for Di respond
value when use ReadCom command.
Program :
#include <iVIEW.H>
#include <mmi100.H>
void main()
{
int port=2;
int x, y,i,j=0,n,c,check,color=1,coloro=0;
int quit=0,Dotemp;
int DiCT[4] = {1, 2, 4, 8};
int DoCT[5]= {1,2,4,8,16},doON[5]={0,0,0,0,0}; /*initial the Do light all OFF*/
char diR[6], tt;
char doT[7]="@0100\r"; /*initial to sned the Do light all OFF command*/
InitLib(); /*initial Lib*/
InitLCD(); /*initial LCD*/
//draw manu
Line(12,28,118,28,1);
Box( 12,12,118,44,1);
SetCursorLine(2);
SetCursorAt(7, 5);
GetCursorAt(&x, &y);
TextOutAt(1,1, "i-7065D q:quit");
TextOutAt(3,3, "Di:");
TextOutAt(3,5, "Do:");
TextOutAt(1,7, " >:right ^:on");
TextOutAt(1,8, " <:left v:off");
for (i=0;i<4;i++)
lamp(7+i,3,color);
for(i=0;i<5;i++)
lamp(7+i,5,coloro);
Draw menu, set cursor, draw Di lamps
ON, and draw Do lamps OFF for the
initial LCD screen. Control method:
Enter q to quit.
> (right arrow key) to right.
< (left arrow key) to left.
^ (up arrow key) to set light ON
v (down arrow key) to set light OFF