I'm sorry, but I'm still not clear what you mean. Does "keyboard" mean "PC"? Where does "ethernet" come into this? I think you need to explain in more detail what your solution consists of and what sequence of actions you go through to cause the problem, and to avoid it.
Sorry, i will try to explain better.
The program is to help to control the amount of trash generated by some sectors, the sector are listed in the code below:
switch (codigo)// faz o cadastro dos setores na variável setor
{
case 82:
setor = "UTI Adulto";
break;
case 84:
setor = "UTI Neo-Natal";
break;
case 88:
setor = " Pronto Atendimento";
break;
case 90:
setor = "Esterilizacao";
break;
case 74:
setor = " Unidade Internacao A";
break;
case 75:
setor = " Unidade Internacao B";
break;
case 76:
setor = " Unidade Internacao C";
break;
case 77:
setor = " Unidade Internacao D";
break;
case 107:
setor = "Hemodinamica";
break;
case 79:
setor = " Centro Cirurgico";
break;
case 86:
setor = "Bercario";
break;
case 105 :
setor = "Litotripsia";
break;
case 54:
setor = "IPAC";
break;
case 216:
setor = "Mamografia STA CLARA IMAGEM";
break;
case 212:
setor = "RX - Santa Clara Imagem ";
break;
case 211:
setor = "USG - Santa Clara Imagem";
break;
case 52:
setor = "Clinicas Joao Pinheiro";
break;
case 51:
setor = "Clinicas Santos Dumont";
break;
case 80:
setor = "Centro Obstetrico";
break;
default:
setor = " ERRO : Setor Invalido !";
break;
}
So the system must store the sector choose by the user, save this sector, the date and time, and another data that will be transferred by Serial (this last part is not done yet) in the MicroSD in the Ethernet shield, and the administrator of the system must be capable of accessing this data on the SD by the Ethernet using his browser.