Re: readFile function with ESP32
Posted: Thu Mar 14, 2019 3:25 pm
Try
Code: Select all
char buf[32];
int len;
while (len = webFile.read((uint8_t *)buf, 32)) {
client.write((const char*)buf, len);
}
Sirquil wrote:Try making char buf[1024] into char buf[32]
The serial printing may not like the long print....
RichardS
Still drops characters with char buf[32].Code: Select allchar buf[32];
int len;
while (len = webFile.read(buf, 32)) {
client.write((const char*)buf, len);
}
Produces compiler error: invalid conversion from 'char*' to 'uint8_t* {aka unsigned char*}' [-fpermissive]
Thank you for the suggestions.
William