Serial.print and Serial.write problem
(please gentle first time posting here)
hi guys not sure if doing stupid or not.
i reading array of characters memory here data in hex.
i read data out , store in in array following function
if step through , print each element serial correct output ("hello_world")
if following
or
i blank output.
hi guys not sure if doing stupid or not.
i reading array of characters memory here data in hex.
code: [select]
0x48 0x45 0x4c 0x4c 0x4f 0x5f 0x57 0x4f 0x52 0x4c 0x44 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
i read data out , store in in array following function
code: [select]
void readfromeeprom(int start, int stop, char *array) {
for (int = start; < stop; i++)
array[i] = (char)eeprom.read(i);
}
if step through , print each element serial correct output ("hello_world")
if following
code: [select]
serial.write(arraydata);
or
code: [select]
serial.print(arraydata);
i blank output.
show whole code. please. if have full code, can copy our ide , run code test solutions. serial.write one character (byte). print (println) array needs null terminator ('\0') tell print array ends.
Arduino Forum > Using Arduino > Programming Questions > Serial.print and Serial.write problem
arduino
Comments
Post a Comment