below code is ,data read from hmi display to arduino..
this is the data frame from HMI display A5 5A 06 83 00 20 01 04 D2 ,in this i need only last 04 02 data content..in below code i got only 02..bt i need 04 02..
plz help ......
my code
void loop()
{
int m[9];
static int n=0;
int bytes_read = 0;
while (bytes_read < 9)
{
if (Serial.available() > 0)
{
m[n]=Serial.read();
bytes_read ++;
n++;
}
yes..i need 04 D2.it is a data frame..04 D2 is hexadecimal of decimal number 1234...bt i got only 210 instead of 1234..bcs only take D2...deimal of hexD2 is 210...i need fully 04D2....kindly help