proposta de utilização do sistema operacional windows ce ... - UTFPR
proposta de utilização do sistema operacional windows ce ... - UTFPR
proposta de utilização do sistema operacional windows ce ... - UTFPR
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
controla<strong>do</strong>r<br />
sizeof(msg1), &written, NULL);<br />
sizeof(msg1), &written, NULL);<br />
(hPort1,&buffer_rec,5,&dwBytesTransferred,NULL);<br />
scanf("%d",&opcao_manual);<br />
if(opcao_manual==1)//aumenta o Co<br />
{<br />
if(newCo>=95)<br />
newCo=95;<br />
else<br />
newCo=newCo+5;<br />
//Envia Co para o micro<br />
_itoa((int)newCo, buffer, 10 );<br />
strcat(buffer,"A");<br />
i=0;<br />
while(buffer[i]!='A')<br />
{<br />
msg1[0]=buffer[i];<br />
printf(" ");<br />
WriteFile(hPort1,msg1,<br />
i++;<br />
}<br />
printf(" ");<br />
WriteFile(hPort1,"A",<br />
Sleep(200);<br />
//Re<strong>ce</strong>be PV<br />
printf(" ");<br />
ReadFile<br />
i=0;<br />
while(buffer_rec[i]!='A')<br />
i++;<br />
buffer_rec[i]='\0';<br />
PV=(float)atoi(buffer_rec);<br />
printf("\nPV=%.2f",PV);<br />
}<br />
if(opcao_manual==2) //diminui o Co<br />
{<br />
if(newCo