Announcement

Collapse
No announcement yet.

Print string from SD card

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Print string from SD card

    Hello,
    I'm using the uLCD-144-G2
    I am trying to print different previously programmed strings in ViSI from Arduino and I find that the PrintDisk function only prints "?".
    Does anyone know what the problem is?
    Because the program gives me two Strings1Start (Strings1StartL and Strings1StartH)?
    I am attaching the arduino code

    #include <Goldelox_Const4D.h>
    #include <Goldelox_Const4DSerial.h>
    #include <Goldelox_Serial_4DLib.h>
    #include <Goldelox_Types4D.h>
    #include <Goldelox_PrintDisk.h>
    #include "direcciones.h"
    #include "textSPA.h"
    #define DisplaySerial Serial
    Goldelox_Serial_4DLib Display(&DisplaySerial);

    void setup() {
    Display.TimeLimit4D = 5000 ; //5 second timeout on all commands
    pinMode(4, OUTPUT); // Set D4 on Arduino to Output (4D Arduino Adaptor V2 - Display Reset)
    digitalWrite(4, 1); // Reset the Display via D4
    delay(100);
    digitalWrite(4, 0); // unReset the Display via D4
    delay (5000); //let the display start up
    //start
    DisplaySerial.begin(9600) ;
    Display.gfx_ScreenMode(PORTRAIT);
    Display.gfx_Cls(); //clear the screen
    Display.putstr("Starting...\n") ;
    if (trymount()) { //uSD card mount routine
    Display.putstr("uSD card found!\n") ;
    delay(5000);
    }else {
    Display.txt_FGcolour(RED) ; // change font color to red
    Display.putstr("Missing uSD card!\nPlease insert the\nuSD card and reset.\n") ;
    while (1); // hangup
    }
    Display.gfx_Cls();
    }

    void loop() {
    form1mainMK31s ("1");
    delay (1000);
    }

    void form1mainMK31s (String modo){
    Display.gfx_Cls();
    // Strings1
    Display.media_SetSector(0, Strings1FontStartL) ; // must come b4 setting fontID
    Display.txt_FontID(MEDIA) ; // Font index correct at time of code generation
    Display.txt_FGcolour(WHITE) ;
    Display.txt_BGcolour(BLACK) ;
    Display.gfx_MoveTo(36 , 8) ;
    PrintDisk(Display, Strings1StartL, Strings1Size, 0) ; // where i is Message 0 - Strings1Count-1
    }

Working...
X