No announcement yet.

Has anyone gotten a uLCD-43 to work with the Teensy 3.1?

  • Filter
  • Time
  • Show
Clear All
new posts

  • Has anyone gotten a uLCD-43 to work with the Teensy 3.1?

    I have a sketch that runs on an Arduino Leonardo using the genieArduino library, but it seems the library doesn't run properly on a teensy 3.1. Another forum post mentions it working with the goldilox library, so I'm wondering if it is possible with the genie library.

    Has anyone had any success with this display and a Teensy?

  • #2

    Hello Jonathan,

    Do you have an error message or anything associated with this?
    What is it doing and what is it not doing?

    We have some potential changes coming to the library in the next week, which may help with this issue, however it would still be good to know what the problem you have is exactly, as we dont have a Teensy 3.1 as we cannot purchase every single arduino/clone/variant available on the market and test them all out, its just not feasible.

    Any more information you can provide would be appreciated



    • #3

      It won't run the loop at all when genieDoEvents() is called. No error messages appear during upload. The sketch runs fine when there are no genie calls.


      • #4

        What serial port have you configured, etc?

        Probably due to the fact the library has hard coded checks for various processors in the .cpp file (look down the very bottom of the .cpp file), and the teensy 3.1's processor isnt in that list.
        If you want to modify yours to add it, then it may start working for you.

        This is one of the changes the new version of the library is going to have, pending testing. Nothing will be hardcoded, so the compiler will determine the valid serial ports for the board in question, rather than our library.


        • #5

          I think the defines you would need are

          if defined(__MK20DX128__) || defined(__MK20DX256__)

          for the teensy 3.x

          So these just need to be worked into the current structure, based on the serial ports the teensy 3.x has available.


          • #6

            I added those and now the sketch runs, but it isn't receiving commands from the screen as it does when hooked to the leonardo.

            I have the Teensy wired to the 4d LCD arduino shield and the screen plugged in to the righthand 5 pin connector - just as with the leonardo.


            • #7

              Can you post your code please?

              Not sure what help I will be though as I dont have a Teensy 3.1, but I can take a look and see if I can spot something.



              • #8

                HTML Code:
                int event_val;
                void setup() 
                  genieBegin (GENIE_SERIAL_1, 115200);  //Serial1 - I've tried with serial 2 & 3 also
                  pinMode(4, OUTPUT);  
                  digitalWrite(4, 1);  // Reset the Display via D4
                  digitalWrite(4, 0);  // unReset the Display via D4
                  delay (3500); //let the display start up
                  Serial.begin (9600); 
                void loop()   
                void myGenieEventHandler(void) 
                  genieFrame Event;
                //Corresponds w Winbutton01 on my screen
                if (genieEventIs(&Event, GENIE_REPORT_EVENT, GENIE_OBJ_WINBUTTON, 0x01)){
                   Serial.println("Button pressed");


                • #9

                  Hi Jonathan

                  Ok, how have you got it wired up?
                  Have you wired it up via the 4D Arduino Adaptor Shield somehow, or have you just wired it directly?
                  What have you done with the reset from the Display?

                  If you have wired it directly, then you need to change the Reset code, as reset is Active Low. It is Active High when going via the shield as it has a transistor circuit which switches reset, however if you have it wired directly, then its Active Low.

                  This may not be the problem though. If the above was wrong, it would be constantly holding the display in reset.



                  • #10

                    I have the Teensy wired to the 4d LCD arduino shield via pins 1, 0, 4, Gnd, and 5v.


                    • #11


                      Unsure at this point what the issue is. Once we have tested the new library some more, I will reply to this post and provide you with a link to try, and see if that works for the Teensy 3.1. Should be later this week.



                      • #12

                        Hi Jonathan,

                        I have the 4D LCD working on the Teensy 3.1. I have serial port 3 (7&8) wired to the 4D and use the different calls after initializing Serial3 locally:

                        Serial3.begin(115200); genieBegin (Serial3);
                        Serial.begin(115200); genieassignDebugPort(Serial);
                        I have the display with the 5-pin ribbon cable, not the shield.

                        Also, I followed the following advice from the PCJR guy who created Teensy:

                        #1: Delete the Robot_Control and Robot_Motor libraries. Unless you're using the Arduino Robot, you don't need these.

                        #2: Install Teensyduino 1.18-rc4.

                        I don't think these impact the serial ports. What you are describing is usually a failed serial connection. Hope this helps!


                        • #13

                          Thank you Clint

                          Jonathan, let us know how you get on.



                          • #14
                            Can somebody who has this working explain their wiring scheme in a little more detail? Perhaps with and without the Arduino adapter in the equation?

                            How is the 3.3v to 5v issue dealt with specifically?

                            What are you using for power for your entire assembly/project?

                            I want to try the Teensy 3.1 with a 4D 43PT for a current project but I am not quite sure how to deal with the power and logic levels. I am supplying 12v for the motor-side of some stepper drivers, and I'm feeding the Teensy 3.1 with 3.3v input, and logic between the Teensy and my stepper drivers is at 3.3v.

                            I'm not sure how best to power the screen (5v) in a mixed configuration like this.

                            Any advice truly appreciated before I dive into this!



                            • #15
                              The serial comms is not an issue, the display sends and receives at 3.3v.

                              I'm guessing you are dropping 12v to 3v3 for the teensy, you just need to also drop it to 5v for the display.