prblem with a cicle very slow!
Hi all
I've a problem with the first "for" cicle in my code.
The application use a array (pixels[]) of video library and put all the content of array (hex color) in a string using "," as separator. When numPixels = 36100 the application take 40 seconds for make all the cicle....but is very important for me to reduce the second taken for this cicle. What can i do?
Thanks
Giovanni (...from Italy)
{
frame_stream=hex(video.pixels[1])+ ",";
for (int i = 1; i < numPixels; i++) {
frame_stream= frame_stream + hex(video.pixels[i]) + ","; //crea la stringa contenente la il frame
}
myServer.write(frame_stream); //invia il dato
myServer.write(0); //invio la fine del data frame
saveFrame("/immagini/videocamera-####.jpg"); //Salva il frame ogni X tempo
frame_stream=""; //Scrive
delay(3000);
println("Finito invio dati");
frame_stream="";
}

