Announcement

Collapse
No announcement yet.

Problem with "genie.WriteStr " string is blinking on the screen

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

  • Problem with "genie.WriteStr " string is blinking on the screen

    Hi,

    Maybe someone can help me, I try to play with my new display and now I have aproblem to write to a "strings" object from my arduino nano every...
    I can send some text but it is blinking at regular interval.

    Thanks for your help.

    Martin

    Code:
    void loop() {
          genie.WriteStr(0, "My text !");
    }
    Text is blinking fastly.


    Code:
    int flag = 0;
    
    void loop() {
      if(flag == 0){
          genie.WriteStr(0, "My text !");
          flag = 1;
       }
    }
    There is no text...
    Last edited by mlm31; 5 December 2019, 06:03 AM.

  • #2
    Hi,

    void loop() {
    genie.WriteStr(0, "My text !");
    }
    Text is blinking fastly.
    On this code, since you are sending the command on the loop, that is the expected result

    void loop() {
    if(flag == 0){
    genie.WriteStr(0, "My text !");
    flag = 1;
    }
    }
    There is no text..
    However, in this, you should be able to see the text displayed on the screen. It is possible that the display has not been ready yet to receive the command.
    Have you implemented a 'delay' on your Arduino code set-up to allow the LCD to boot first before sending the command? Can you post here your code?

    For reference, here is a simple program
    Code:
    #include <genieArduino.h>
    #define RESETLINE 4  // Change this if you are not using an Arduino Adaptor Shield Version 2 (see code below)
    
    Genie genie;
    int flag = 0;
    
    void setup() {
    
      Serial.begin(200000);  // Console in Arduino IDE on Serial0
      genie.Begin(Serial);
    
      pinMode(RESETLINE, OUTPUT);  // Set D4 on Arduino to Output (4D Arduino Adaptor V2 - Display Reset)
      digitalWrite(RESETLINE, 1);  // Reset the Display via D4
      delay(100);
      digitalWrite(RESETLINE, 0);  // unReset the Display via D4
    
      delay (5000); //let the display start up after the reset (This is important)
    
    }
    
    void loop() {
    
      if(flag == 0){
          genie.WriteStr(0, "My text !");
          flag = 1;
       }
    }
    Best Regards,
    Kevin

    Comment


    • #3
      Hi Kevin,

      Thank you very much for your answer.

      My code looks like your "simple program".
      I don't understand were I am wrong

      Code:
      #include <genieArduino.h>
      #include "SoftwareSerial.h"
      
      #define RESETLINE 2
      SoftwareSerial mySoftwareSerial(10, 11); // RX, TX
      Genie genie;
      
      int flag = 0;
      
      void setup() {
        mySoftwareSerial.begin(115200);
        genie.Begin(mySoftwareSerial);
      
        pinMode(RESETLINE, OUTPUT);
        digitalWrite(RESETLINE, 0);
        delay(100);
        digitalWrite(RESETLINE, 1);
        delay(3500);                                      //I also tried with 5000
        Serial.println("Display ready...");
      
        genie.WriteObject(GENIE_OBJ_FORM, 0x00, 0);           //try to select Form0
      }
      
      void loop(){
          if(flag == 0){
              genie.WriteStr(0, "My text !");
              flag = 1;
          }
      }
      NOTHING HAPPEN ON THE SCREEN if I put "If" condition in the loop...

      This afternoon I will show you my hardware, maybe there is a problem with it.

      Thanks for your time,
      Have a good day.

      Martin

      Comment


      • John Kevin
        John Kevin commented
        Editing a comment
        Hi Martin,
        Have you tried to put the genie.WriteStr(0, "My text !"); on the setup method?

      • mlm31
        mlm31 commented
        Editing a comment
        No, Kevin.
        I will try it this afternoon.

    • #4
      So,

      For my hardware, I am using an Arduino Nano Every + 4D-UPA module + gen4-uLCD-43D.
      1. The display is connected to the 4D-UPA with FFC cable, there is a 4gb (FAT16) inside the screen and a usb cable between PC and 4D-UPA.
      2. The arduino is connected to the 4D-UPA with jumper wires (arduino pins 10 & 11 = RX & TX) to PA2 & PA3. There is another usb cable between PC and arduino. I only connect ground between 4D-UPA and the arduino.

      In Workshop4 I have configured serial port 1 to PA2 / PA3.
      I hope this is good...

      On my computer in my workshop4 project I click on "build and upload", I use Ftr103 to upload compiled files to the µSD.

      What do you think ?

      Comment


      • John Kevin
        John Kevin commented
        Editing a comment
        Hi,

        Please try to connect the RES pin of the 4DUPA to the pin 2 of your Arduino. The Display needs to be in sync with Arduino. Though, I do not see any problem on your hardware connection. The serial port for the display is also configured correctly. Looking at the Nano Every, there seems to be another HW serial port. Have you tested it?

        Best Regards,
        Kevin

      • mlm31
        mlm31 commented
        Editing a comment
        Yes, I did it. Reset pin is connected.
        I have set the baudrate to 200K bauds in 4D workshop and change it in my arduino code it's working...

    • #5
      Hi Kevin,

      Sorry I was very busy yesterday afternoon...
      I read differents application note and check again parameters in 4D workshop. Furthermore I did what you suggest and now I can write some text.
      I don't know why, "if condition" doesn't works, so for the moment I have some blinkling when text is big and nothing if the font is small size.
      I can play some gif files, so I can write to Timer it's better than last week !

      I have created an other post "How to play more than 8 videos..." maybe you have some ideas ?!

      This topic isn't really closed because text is blinking but I will do some experiments and write my results here...

      Thanks for your help,
      Have a good day.

      Martin

      Comment


      • #6
        Hi Martin,

        Thank you for your reply.

        I don't know why, "if condition" doesn't works, so for the moment I have some blinkling when text is big and nothing if the font is small size.
        This is really weird. Is it possible to post here your project files? (Arduino sketch, and Workshop file). I will also wait for the experiments and results you will perform.

        I have created an other post "How to play more than 8 videos..." maybe you have some ideas ?!
        This forum thread has gone unnoticed. I will check it and post my reply.

        Thank you and have a good day!

        Best Regards,
        Kevin

        Comment

        Working...
        X