Announcement

Collapse
No announcement yet.

Leddigits

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

  • Leddigits

    Hi guys, how i can change the colour of the leddigits?
    I implement the library "ledDigitsDisplay.inc"; i try to study the library, but i cant see how can i can change the colour.
    For example:

    //Led egt1
    ledDigitsDisplay(egt1, iLeddigits4+1, 0, 4, 1, 30, 1);

    .
    .
    .

    if (egt1 > 800)

    //change colour of leddigits

    endif

    How I can do this? Thank for your time.

  • #2
    Hello Eros,

    Fortunately, there are several ways to achieve that, two of these are by superimposing two LED digits objects (much easier) and by using two sets of .gci and .dat files.

    Using the second method:

    1. First, add a LED digits object to the project and edit the colour accordingly (say set the colour to GREEN).



    2. After editing, save the project with a name (example: Sample).
    3. Hit Compile and Load(F9).

    4. Check the contents of the SD card then rename the file "Sample.gci" to "GreenLD.gci" and the file "Sample.dat" to "GreenLD.dat".

    5. Next, go back to WS4 then change the colour of the LED digit object (for example, set it to RED) as shown below:

    Click image for larger version

Name:	3.jpg
Views:	50
Size:	47.5 KB
ID:	63742

    6. Repeat steps 2 and 3.

    7. Go to the SD card then rename the file "Sample.gci" to "RedLD.gci' and the file "Sample.dat" to "RedLD.dat".

    The final contents of the SD card should now look as shown below.

    Click image for larger version

Name:	4.jpg
Views:	18
Size:	28.6 KB
ID:	63743

    8. You may then write a routine to access the files during runtime.


    I’ve attached two sample projects to demonstrate my point.

    Please take note that:

    Sample.zip(Using two sets of .gci and .dat files)
    Sample2.zip(By superimposing two ledDigits objects)


    Feel free to ask if you have questions.

    Hopefully, this will help you.
    Best Regards,
    Kayven

    Comment


    • #3
      Thank you so much Kayven! The leddigits now are working!
      Thank for your time!

      Comment


      • #4
        Hello Eros,


        We're glad that your project is now working fine.
        We'd love to continue providing solutions to awesome customers like you.
        Please, do contact us if you have additional queries.


        All the best,

        Kayven
        Last edited by [email protected]; 1st June 2018, 01:03 PM.

        Comment

        Working...
        X