Go Down

Topic: Load an image from a String variable (Read 164 times) previous topic - next topic

AnibalBenegas

Hello, I have a problem when loading an image call from an array of String, someone could me a solution to this issue.
let down the code explaining my doubts.

  comb_prev = String("COMB/");
  comb_post = String(".RAW");

void loop(){

for (int i=0; i< 31; i++){
    myGLCD.printNumI(i,25,226,3);
      comb = i;
      comb_image_concat();
      delay(20);
    }
}

void comb_image_concat() {

  comb_parcial = comb_prev + comb;
  comb_complet = comb_parcial + comb_post;
  myFiles.load(9,9, 50,219,comb_complet);
}

AnibalBenegas

Hello, I have a problem when loading an image call from an array of String, someone could me a solution to this issue.
let down the code explaining my doubts.


#include <UTFT.h>
#include <UTFT_SdRaw.h>

 UTFT myGLCD(SSD1289, 38,39,40,41);
 UTFT_SdRaw myFiles(&myGLCD);

#define SD_CHIP_SELECT  53

  String comb_prev, comb_post, comb_parcial, comb_complet;
  int comb;

void setup() {
 
  myGLCD.InitLCD(LANDSCAPE);                   // Initialize the display
  myGLCD.clrScr();                             // Clear the screen (black)
  sd.begin(SD_CHIP_SELECT, SPI_QUARTER_SPEED); // Initialize the SD card
 
  Serial.begin(9600);                          // Initialize Serial Port
 
  comb_prev = String("COMB/");
  comb_post = String(".RAW");
 
}

void loop(){

for (int i=0; i<= 30; i++){
    myGLCD.printNumI(i,25,226,3);
      comb = i;
      comb_image_concat();
      delay(200);
    }
}

void comb_image_concat() {

  comb_parcial = comb_prev + comb;
  comb_complet = comb_parcial + comb_post;
  myFiles.load(9,9, 50,219,comb_complet);
}


in a sd memory, in a folder (COMB) are stored the images that must be charged according to the value of comb

Go Up