Announcement

Collapse
No announcement yet.

Refresh value on uOled 160 G2

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

  • Refresh value on uOled 160 G2

    How to refresh value on display.
    When an value is from 0 to 999 and then to 0 then my display gif 099 instead of 000
    Is dare an solution for?
    I use an Arduino and the last Goldelox library

  • #2
    Hi,

    Are you using a custom digits objects ? If yes, were you able to use the example that I attached to post #7 of this thread?

    http://forum.4dsystems.com.au/forum/...8-visi-example

    Regards.

    Doff

    Comment


    • #3
      Doff
      Hello, I use for this project not the custom digits objects but Arduino is controlling the uOled via serial commands
      is there a way to refresh the value?!
      the example is not jet working because my Arduino have one serial connection. maybe must I use software serial instead??!!

      PvdBos

      Comment


      • #4
        Hi,

        Can you post your project?

        Regards.
        Doff

        Comment


        • #5

          Hello, Doff this is my code that view a compass on the uOled but when the value goes from 359 to 0 then I see 059 and not 000.
          void Hmc6352() {
          HMC6352.Wake();
          Display.txt_MoveCursor(4, 10);
          Display.txt_FGcolour(YELLOW);
          Display.txt_Opacity(TEXT_OPACITY);
          Display.println(HMC6352.GetHeading());
          HMC6352.Sleep(); }

          Comment


          • #6
            Hi,

            You will have to make sure that values from previous prints are cleared. One solution is to determine first the maximum number of digits possible for the printed values. Then use space characters to clear the unwanted characters from previous prints. The method "HMC6352.GetHeading()", for example, returns values composed of up to 3 digits only,so you should format the printing as follows:

            Code:
            Display.print(HMC6352.GetHeading());
            Display.println("  ");
            The two space characters at the end ensure that digits from previous prints are always erased.

            Hope this helps and regards.
            Doff

            Comment


            • #7
              Thanx, Doff It's so simple......

              Comment

              Working...
              X