Announcement

Collapse
No announcement yet.

polyline stalled on uOLED-96-G2

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

  • polyline stalled on uOLED-96-G2

    Hi all,

    I have a problem with the uOLED-96-G2 display.
    I'm using the polyline function and it works fine until I change the contrast to 0 and then change it back to 10 (or any other visible value). When the contrast is changed from zero to somethig else the polyline function is not working anymore.. the display is unable to draw any line... though other commands (such as "print" or "rectanglefilled" functions) are still work.
    Plus info: very strange but this problem occurs only If I'm using the display with 38400 bps or higher baudrate
    Can anybody explain to me what is happening?

    - George Cs. -

  • #2
    Hello George,

    Welcome to the Forum!

    Since you mentioned the baudrate, I assume you're doing this in the Serial environment, right?

    I tried to simulate your issue on my end, here's what I did.

    1. draw a polyline.
    2. set the contrast to zero, then set the contrast to 10.
    3. clear the screen then redraw the Polyline.

    I tried this with 38400 and 115200 bps and it seems to have worked well on my end.

    When you're trying to communicate with the display on the baudrates that you've mentioned, were you also modifying the baudrate of the display as shown inthe image below?

    Click image for larger version

Name:	SPE.PNG
Views:	43
Size:	48.7 KB
ID:	67894

    Is there anyhting that I might be missing? Could you send atleast the code snippet that does what you described?

    Best regards,

    Michael

    Comment


    • #3
      Hi Michael,

      I'm using Arduino IDE with your Goldelox_Serial_4D lib. The hardware is an ATmega1284 based board with external 16 MHz clock.
      I attached a test code, if you try this you will see what's the problem (at least I hope so). As I mentioned, polyline function stops after the first display off/on cycle.

      Best regards,

      - George Cs. -
      Attached Files

      Comment


      • #4
        I tried it with an Arduino 2560 board too. Result is the same.. It seems that display is unable to process drawing commands (polyline, polygon) after a zero-to-something contrast change.
        Meanwhile I implemented the "Callback4D" error handling routine. Result: when gfx_Polyline becomes stalled the error code will be 1 (timeout) and the error byte is 0xFF (I don't know what it means).
        Any help would be great...

        - George Cs. -

        Comment


        • #5
          Hello George,

          I've tested your code and from what I can see, the display doesn't seem to have enough time to respond since the timeout is quite short.

          I've set Display.TimeLimit4D to 5 seconds and it seem to have worked well.

          I hope this helps.

          Best regards,
          Michael

          Comment


          • #6
            Hi Michael,

            you're right, the 100 ms timeout was too short! I changed it to 500 ms and now works like a charm.

            Thanks for your help,

            - George Cs. -

            Comment


            • #7
              Glad it worked, George!
              Michael

              Comment

              Working...
              X