sdcard load pictures with effective way
i upload picture stored in sdcard using zoomkat codes this
if(readstring.indexof("image") >=0) {
client.println("content-type: image/jpeg");
client.println(); }
//select file send browser
if(readstring.indexof("image") >= 0) {
file myfile = sd.open("image.jpg");
if (myfile) {
while (myfile.available()) {
client.write(myfile.read());
}
myfile.close();
}
}
my problem now is have many pictures on sd card , need upload of them if repeat code waste lot of memory
my question can loop to identify , upload many pictures i tried but not working any suggestion be appreciated
the picture i want to upload has this name (image00 -> image09)
if(readstring.indexof("image") >=0) {
client.println("content-type: image/jpeg");
client.println(); }
//select file send browser
if(readstring.indexof("image") >= 0) {
file myfile = sd.open("image.jpg");
if (myfile) {
while (myfile.available()) {
client.write(myfile.read());
}
myfile.close();
}
}
my problem now is have many pictures on sd card , need upload of them if repeat code waste lot of memory
my question can loop to identify , upload many pictures i tried but not working any suggestion be appreciated
the picture i want to upload has this name (image00 -> image09)
please post code tried if didn't work.
it sounds me though need function read file , name of file passed function parameter. way file reading code has be written , maintained in function, not multiple times.
it sounds me though need function read file , name of file passed function parameter. way file reading code has be written , maintained in function, not multiple times.
Arduino Forum > Using Arduino > Programming Questions > sdcard load pictures with effective way
arduino
Comments
Post a Comment