Announcement

Collapse
No announcement yet.

uOLED-162g2 with Teensy 3.6

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

  • #16
    Dear superhb,

    Could you please follow the link to install Teensy 3.6 support for the Arduino IDE so you can use the Library?

    --> https://www.pjrc.com/teensy/td_download.html

    Best regards,

    Comment


    • #17
      Originally posted by Noel View Post
      Dear superhb,

      Could you please follow the link to install Teensy 3.6 support for the Arduino IDE so you can use the Library?

      --> https://www.pjrc.com/teensy/td_download.html

      Best regards,
      I already have that installed. As I'ved used the teensy before with other libraries

      Originally posted by tonton81 View Post
      can you link the library your using for teensy for goldilox i wanna look at the source files
      https://github.com/4dsystems/Goldelo...rduino-Library
      Last edited by superhb; 23rd February 2017, 08:56 PM.

      Comment


      • #18
        the source files look fine and should be fine on teensy, did you make sure theres a delay in setup (and not remove it) after you reset the lcd.

        Comment


        • #19
          The delay is set to low delay for 100ms, set back to high, then delay for 2s. The thing is. If I use the library the sketch stops running before it can run the setup or loop function

          Comment


          • #20
            the delay must be there in setup before writing to lcd after the reset, it must wait 3-5 seconds then continue

            Comment


            • #21
              please dont forget the teensy boots up VERY fast, there should be at least a 1 second delay in setup for some hardware to initialize properly, this is a known "feature" that can make some libraries "pass out"

              Comment


              • #22
                Doesn't seem to be an issue with the timing. I set a delay for 5s in the beginning of setup and changed the delay after the reset to 5s as well. Still the same effect.

                Comment


                • #23
                  can you try this library to see if it works? i dont have the oled but it compiles fine

                  https://github.com/garretlab/GOLDELOX

                  Comment


                  • #24
                    Originally posted by tonton81 View Post
                    can you try this library to see if it works? i dont have the oled but it compiles fine

                    https://github.com/garretlab/GOLDELOX
                    That library works! Thank you!

                    Comment


                    • #25
                      your welcome

                      Comment


                      • #26
                        Originally posted by tonton81 View Post
                        can you try this library to see if it works? i dont have the oled but it compiles fine

                        https://github.com/garretlab/GOLDELOX
                        I also tried this library as I could not get the official library to work with a hardware serial port on a Teensy 3.2, with your library it works. Thank you very much!
                        Here's a picture of my test setup:

                        Click image for larger version

Name:	ZeusPC3.jpg
Views:	2
Size:	857.7 KB
ID:	56528

                        I added a setFont method:
                        Code:
                        int setFont(uint16_t FontNumber);
                        
                        int GOLDELOX::setFont(uint16_t FontNumber) {
                          sendWord(GOLDELOX_CMD_SET_FONT);
                          sendWord(FontNumber);
                        
                        return getResponse(GOLDELOX_RESPONSE_ACK);
                        }
                        Now I can do everything I wanted:
                        • Custom font, I wanted to fill the available screen space with 16 characters.
                        • High resolution icons indicating the device under control
                        • High resolution soft buttons
                        With the official library I couldn't get the hardware serial working, with software serial I could get it to work but the operation was very unreliable. It would be great if the people at 4D could look into this, perhaps even make the libraries part of the additional content install of Teensyduino. The Teensy uOLED display combination is ideal for compact high quality devices like this little midi program change device.

                        By the way, the appnotes are excellent, everything I needed to know was in there, thank you very much for those!

                        Kind regards,

                        Gerrit
                        Attached Files

                        Comment


                        • #27
                          Originally posted by tonton81 View Post
                          can you try this library to see if it works? i dont have the oled but it compiles fine

                          https://github.com/garretlab/GOLDELOX
                          I found an error in your library in GOLDELOX.cpp at line 555, there's a typo in the byteshift:
                          Code:
                          int GOLDELOX::getResponseByte(uint8_t response, uint8_t *value) {
                          union {
                          char buffer[2];
                              uint16_t value;
                            } buffer;
                          int result;
                          
                          if (result = getResponse(response)) {
                          while (serialPort->available() < 2) {
                                delay(2);
                              }
                              buffer.buffer[1] = serialPort->read();
                              buffer.buffer[0] = serialPort->read();
                            }
                            //*value = buffer.value & 0x0f;
                            *value = buffer.value & 0xff;
                          return result;
                          }
                          After correcting this I could successfully save and read bytes to and from the SD card.

                          Kind regards,

                          Gerrit

                          Comment


                          • #28
                            I'd like to make a correction here that this is not my library but one I found off github that was worth testing. However this post will be beneficial for others who will use it as well in their project
                            Thank you for your continued support

                            Tony

                            Comment


                            • #29
                              Originally posted by tonton81 View Post
                              I'd like to make a correction here that this is not my library but one I found off github that was worth testing. However this post will be beneficial for others who will use it as well in their project
                              Thank you for your continued support

                              Tony
                              Excuses me, my mistake. It's certainly not meant as a complaint. I'm actually very glad I was able to track down this error and correct it, it means I must be learning something
                              I just got the code working to retrieve a 16 character name from the SD card and display it on the screen in the font of my choosing.

                              On the Teensy forum there's a thread relating to the project I'm working on: https://forum.pjrc.com/threads/42589...lback-function

                              Kind regards,

                              Gerrit

                              Comment

                              Working...
                              X