How to pass the value of a position to a variable, being this position received in ASCII? [closed]

2

So I send a piece of my script so you can help me. I need to return the variable rsp , which always brings the value equal to 0, which was not to be done.

// Envia comando de Leitura de Posição 
serial.Write('R');
serial.Write('7');// controle: absoluto (1) pra cima(1)  e velocidade (3) 
serial.Write(' ');// angulo inicial 
System.Console.WriteLine("Comando enviado.");

// Espera a resposta da Luneta
rsp = serial.ReadChar(); 

System.Console.WriteLine("Resposta recebida.");

//Mostra resposta na Output Window
Console.WriteChar("Resposta: " + rsp);
    
asked by anonymous 03.11.2015 / 12:40

0 answers