No announcement yet.

Diable16 screen (GEN4-ULCD-70DT-SB-AR) with ViSi library does not work on SAMD21

  • Filter
  • Time
  • Show
Clear All
new posts

  • Diable16 screen (GEN4-ULCD-70DT-SB-AR) with ViSi library does not work on SAMD21


    I am trying to get a GEN4-ULCD-70DT-SB-AR screen to work with a SAMD21G board. Everything else I am using with standard arduino libraries work just fine, however I am unable to get this particular one to work. When I use genie.WriteStr, nothing happens. There are no errors on compiling in either the Arduino IDE or Workshop4.

    Here is the code I am using. The only thing I changed was "Serial" to "Serial1" because D0/D1 are Serial1 on the SAMD21 boards, and I reversed the D4 pin. I have tried swapping the Tx/Rx lines to no avail. Any help would be much appreciated! The exact board is the SparkFun SAMD21 Dev Board (

    * Write String Test - Demo application
    * This demo simply illustrates the various ways you can now send data to a String
    * object in ViSi-Genie, from an Arduino.
    * Demo uses Hardware Serial0 to communicate with the 4D Systems display module.
    * Simply create a Workshop4 Genie application for your 4D Systems display module,
    * and place a single 'Strings' object on the display, and download it to your module.
    * It will have the ID Strings0. This is then populated with data in the demo code below.
    * PLEASE NOTE: If you are using a non-AVR Arduino, such as a Due, or other variants
    * such as a Chipkit or Teensy, then you will need to comment out the Flash String
    * line below - Line 60, as it will prevent the demo from compiling.
    #include <genieArduino.h>
    Genie genie;
    #define RESETLINE 4 // Change this if you are not using an Arduino Adaptor Shield Version 2 (see code below)
    // Setup function
    void setup()
    // Use a Serial Begin and serial port of your choice in your code and use the genie.Begin function to send
    // it to the Genie library (see this example below)
    // max of 200K Baud is good for most Arduinos. Galileo should use 115200 or below.
    // Some Arduino variants use Serial1 for the TX/RX pins, as Serial0 is for USB.
    Serial1.begin(9600); // Serial0 @ 9600 Baud
    genie.Begin(Serial1); // Use Serial0 for talking to the Genie Library, and to the 4D Systems display
    // Reset the Display (change D4 to D2 if you have original 4D Arduino Adaptor)
    // If NOT using a 4D Arduino Adaptor, digitalWrites must be reversed as Display Reset is Active Low, and
    // the 4D Arduino Adaptors invert this signal so must be Active High.
    pinMode(RESETLINE, OUTPUT); // Set D4 on Arduino to Output (4D Arduino Adaptor V2 - Display Reset)
    digitalWrite(RESETLINE, LOW); // Reset the Display via D4
    digitalWrite(RESETLINE, HIGH); // unReset the Display via D4
    delay (3500); //let the display start up after the reset (This is important)
    // Main loop
    void loop()
    //An optional third parameter specifies the base (format) to use; permitted values are BIN (binary, or base 2), OCT (octal, or base 8), DEC (decimal, or base 10), HEX (hexadecimal, or base 16).
    //For floating point numbers, this parameter specifies the number of decimal places to use.
    int x = -78;
    long y = 171;
    double z = 175.3456;
    int digits = 3;
    String Str = "This is string class";
    genie.WriteStr(0, "TEST"); // Write to String0 Object, with the string "TEST"
    In the Workshop4 IDE, I created a new ViSi Genie project, added a Strings field (Strings0), and I even pre-populated it with "abc" to confirm that I can see that just fine on the screen.

    Everything works fine with this setup on an Arduino Mega. I just change Serial1 back to Serial, and put the D4 settings back to 0/1 instead of LOW/HIGH.

    I have also tried the BETA library at with no additional luck.

    Thanks in advance for any help to get this working!

  • #2
    Good day!

    Can you please describe provide more information regarding this?

    You already mentioned:

    When I use genie.WriteStr, nothing happens. There are no errors on compiling in either the Arduino IDE or Workshop4.
    I have a few questions:
    1. Are you still using the 4D Arduino Adaptor Shield when you switched to the SAMD21 board? If yes, there shouldn't be any need to invert the pulse.
    2. Does the display show the form and widgets?
    3. Are you able to receive messages from the display? Ex. Report Message from a button or slider
    4. Can you update other widgets? Ex. Led or Gauges
    5. Have you tried other baudrates?
    It would be help figure out what the problem is by providing more information regarding the behavior of your setup.

    Best Regards

    Juniel Cruz


    • #3
      Hi Juniel,

      I tried hooking the UART Tx/Rx ports from my SAMD21 board directly to a UART serial USB cable into another computer. If I do something basic such as Serial.println("Hello World"), it will print out on the other computer that is listening to the serial commands. If I do genie.WriteStr() (or any other command for that matter), all it does is pass a blank line. If I hook it up identically using an Arduino Mega, it shows the expected serial data. The issue seems to be with the genie library on the SAMD21 chipset (from what I can tell). I have tried other BAUD rates with no success.

      I am also unable to read anything from the board.


      • #4
        A quick update... I was able to get it working if I used the GEN4-IB interface. Of all things, it turns out that the ribbon cable was bad. The one to my Arduino Mega was OK, but the one to the SAMD21 was bad. UGH!

        Anyways, problem solved.


        • #5
          Good day!

          That's good to know. I'm glad you solved your issue.

          If you have any other inquiries, please don't hesitate to raise a support ticket or start a new forum thread.

          Best Regards
          Juniel Cruz