I am using im920 radio module, this device transmits all data as HEX, So now I put all received data in the array. Now i am unable to convert to those character into HEX.
array 'data_value[1]' & array 'data_value[2]' have the temperature and Humdity value.
Below i am sharing my code, i will be very Grateful if someone helps me here:
void loop() {
// put your main code here, to run repeatedly:
delay(1000);
if (im920serial.available()){
count=0;
count2=0;
while (im920serial.available()){
dummy=im920serial.read();
if (dummy!=',' && dummy!=':') {
data_value[count2][count]=dummy;
count++;
}
if (dummy==':') {
count=0;
count2++;
}
if (count2>0 && count>3) {
count=0;
count2++;
}
}
}
Serial.println(data_value[1]);// this the array value for Temp; How i convert this value?
//Serial.println(data_value[0]);
//Serial.println(data_value[1]);
//Serial.println(data_value[2]);// this the array value for Humd; How i convert this value?
if (Serial.available())
im920serial.write(Serial.read());
}