I am currently implementing some code that reads in images from an SD (as a fat_file_struct) and sends this onto the next node.
I was thinking of using ifstream but I was wondering if anyone had tried this and what the best way to implement this would be?
Below is an example of what I have tried, but I am not sure of the best way to read the file and rebuild it at the other end?
image = SD.openFile("img.jpg");
if(image) USB.println("Image read in");
img = fat_read_file(image, buffer, sizeof(buffer));