I have this :
Serial.write(charBuf[0]); //gives 5
String data(charBuf);
Serial.write(data); //gives nothing (space)
first is prints 5 , second prints nothing . What am i missing? is it has to do with NULL terminated stuff ?
This is how the buffer is being created :
int len=1;
char charBuf[len];
for(int k=ACT_THRESH;k<ACT_THRESH+len;k++)
{
charBuf[k-ACT_THRESH]= EEPROM.read(k);
}