![](https://pdfstore-manualsonline.prod.a.ki/pdfasset/4/44/44414c02-d064-4424-ae12-8acc58561d02/44414c02-d064-4424-ae12-8acc58561d02-bg59.png)
iVIEW-100 Series user’s Manual, 2006, v2.0 ----- 89
}
}//end (IsCom())
//control Do
if(Kbhit())
{
c=Getch();
if(c=='Q'||c=='q') quit=1;
else
{
Print("c=%d \r\n",c);
if(c==137 && x<11) //right arrow key, cursor go right
{x++; SetCursorAt(x,y);}
if(c==138 && x>7) //left arrow key, cursor go left
{x--; SetCursorAt(x,y);}
if(c==140||c==139) //Up key or down key, Do ON/OFF
{
if(c==140) coloro=1; //Up key, LCD lamp ON
else coloro=0; //Down key, LCD lamp OFF
lamp(x,y,coloro);
doON[4-(x-7)]=coloro; //store Do light situation to doON
Dotemp=0;
for(i=0;i<5;i++)
Dotemp=DoCT[i]*doON[4-i]+Dotemp;
Print("Dotemp=%d \r\n",Dotemp);
if (Dotemp<16)
{
doT[3]='0';
doT[4]=hex_to_ascii[Dotemp];
}
else
{
doT[3]='1';
doT[4]=hex_to_ascii[Dotemp-16];
}
ClearCom(port);
for (i=0;i<6;i++) {
ToCom(port,doT[i]);
If there any keyboard input, begin the
Do control process.
Calculate the
Do light
situation,
transfer to
send Do
command to
set I-
light ON or
OFF.