Announcement

Collapse
No announcement yet.

ledDigitsDisplay function

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

  • ledDigitsDisplay function

    Hi there,

    I'm trying to show some numbers with this ledDigitsDisplay function but the digits won't change. Here is the code that I'm using:

    // Es mostra el valor de la tensió DC
    img_Show(Ihndl, iLeddigits_V);
    ledDigitsDisplay(10, iLeddigits_V+1, 192, 3, 1, 23, 0) ;

    // Es mostra la potència
    img_Show(Ihndl, iLeddigits_P); // show all digits at 0, only do this once
    ledDigitsDisplay(5, iLeddigits_P+1 , 192, 4, 2, 17, 0) ;


    // Es mostra la freqüència
    img_Show(Ihndl, iLeddigits_F); // show all digits at 0, only do this once
    ledDigitsDisplay(2, iLeddigits_F+1, 192, 3, 2, 23, 0) ;

    I have also inherited #inherit "LedDigitsDisplay.inc". Any suggestion?

    Thanks in advance.

  • #2

    No idea from that what is actually going on.

    Try the ViSi sample 'Widgets' and follow the directions, and/or use this bit of code here.


    func main()
    var numx ;
    putstr("Mounting...\n");
    if (!(disk:=file_Mount()))
    while(!(disk :=file_Mount()))
    putstr("Drive not mounted...");
    pause(200);
    gfx_Cls();
    pause(200);
    wend
    endif

    hndl := file_LoadImageControl("widgets.dat", "widgets.gci", 1);
    // leddigits1 1.0 generated 28/09/2013 8:08:45 AM
    img_Show(hndl, ileddigits1); // show all digits at 0, only do this once
    repeat
    numx := ABS(RAND() % 1000) ;
    numx := numx / 10 ;
    ledDigitsDisplay(numx, ileddigits1+1, 0, 4, 2, 60, 1) ;
    pause(250) ;
    forever

    endfunc

    That should show you a LedDigits changing.

    Can you work out now, why your code does not work?

    Maybe post it all?
    Mark

    Comment

    Working...
    X