void checkEPSCommand(byte byteRead[])
{
byte responseByte[7] = {0x00};
switch(byteRead[2])
{
case 01:
//Request Device ID
for (int i=0; i<3;i++)
{
responseByte = byteRead*;*
* }*
* responseByte[6] = DeviceID;*
* replyCommand(responseByte);*
* break;*
* case 02:*
* //Read Analog Voltage*
* // read the input on analog pin 0:*
* int sensorValue = analogRead(A0); //declared*
* // Convert the analog reading*
_ float voltage = sensorValue * (12.0 / 1023.0);
* {*
* for (int i=0; i<=12;i++)*
* {*
responseByte = byteRead*;*
* }
responseByte[5] = (byte)voltage >> 16;
responseByte[6] = (byte)voltage;
replyCommand(responseByte);
break;
}
}
}*
anybody that can help me? it is now showing a real number only when im trying to get the values. i need to make them to display in decimals with 2 decimal place. anybody kind enough to help? thanks alot_