Announcement

Collapse
No announcement yet.

Create custom Digits

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

  • Create custom Digits

    Hello,
    I need some help to create custom digits.
    I tried to do something with photoshop but It's wrong because it's don't display correctly.

    Click image for larger version

Name:	custom-digits-white.jpg
Views:	260
Size:	21.0 KB
ID:	69082

    Thanks

  • #2
    Solved.
    You can close
    Thanks

    Comment


    • John Kevin
      John Kevin commented
      Editing a comment
      Ok, thanks for letting us know.

  • #3
    Hello,

    Following our conversation on this thread, I think you are using this code snippet for changing the values on Led Digit

    Code:
    void ledDigitsDisplay(int newval, int indexH, int indexL, int left, int top, int Digits, int MinDigits, int WidthDigit, int LeadingBlanks)
    {
      int i, k, l, lb ;
      l = 1 ;
      for (i = 1; i < Digits; i++) l *= 10 ;
    
      lb = LeadingBlanks ;
      for (i = 0; i < Digits; i++)
      {
        k = newval / l ;
        newval -= k * l ;
        if ( lb && (i < Digits - MinDigits) ) {
          if (k == 0)
            k = 10 ;
          else
            lb = 0 ;
        }
        l /= 10 ;
        Display.media_SetAdd(indexH, indexL) ;
        Display.media_VideoFrame(left + i * WidthDigit, top, k) ;
      }
    }

    Please take note of the value of WidthDigit, as this will be the width of each digit you will create.

    For example on this code:

    Code:
    ledDigitsDisplay(i, iiCustomdigits1H, iiCustomdigits1L, 10, 20, 3, 1, 20, 0) ;
    You will need to create a width of 20px for each digit. Please take a look at the image below:

    Click image for larger version

Name:	CD_20.PNG
Views:	256
Size:	56.3 KB
ID:	69092


    For example on this code:

    Code:
    ledDigitsDisplay(i, iiCustomdigits2H, iiCustomdigits2L, 10, 92, 4, 1, 18, 0) ;
    You will need to create a width of 18px for each digit. Please take a look at the image below:

    Click image for larger version

Name:	CD_18.PNG
Views:	230
Size:	28.2 KB
ID:	69093


    I hope this helps.
    Best Regards,
    Kevin

    Comment


    • #4
      Click image for larger version

Name:	smiley_thank_you.jpg
Views:	187
Size:	9.6 KB
ID:	69115

      I found the good combination.

      Comment

      Working...
      X