|
<< Click to Display Table of Contents >> Navigation: Diversen / Conversie > Char naar ASCII waarde |
String commando = readData.substring(0,3); // Dit is een hele string bijv B10
String type = commando.substring(0,1); // B
String schakelaar = commando.substring(1,2); // 1
int stand = commando.substring(2,3).toInt(); // 0
char code = type.charAt(0); // Als je int a = code doet dan zal a de ascii waarde bevatten
swiich(code)
{
case 'A'A // A Action
{
rfSwitchAction(schakelaar.charAt(0), stand);
}
break;
case 'B': // Blokker
{
.....
}
break;
......
}