No announcement yet.

Help with Custom Images AND Fonts with uOLED-128G2

  • Filter
  • Time
  • Show
Clear All
new posts

  • Help with Custom Images AND Fonts with uOLED-128G2

    Hello! I currently have my uOLED-128G2 display configured in serial mode paired with an Arduino Uno. I have a set of images on the SD card that I'm using. I've decided I also want to include a third party font. The instructions on 4D-AN-00084 demonstrate copying the font using Visi which appears to overwrite the contents of my SD card. I used the Graphics Composer to copy the images (RAW) to the SD card.

    Can someone point me in the right direction to get my images and necessary files for fonts to the SD card?

    Thanks in advance.

  • #2
    Hi tdub,

    These application notes might help you with copying the images you want in the SD card (RAW) for Goldelox.

    Serial Displaying Images from the uSD Card RAW

    ViSi Displaying Images from the uSD Card - WYSIWYG RAW

    Designer Displaying Images from the uSD Card - RAW

    You might want to try and use those App Notes in conjunction with the 'Font' App note to be able to copy both of the type of files you need.

    Best Regards,


    • #3
      Regarding AN-00061 ViSi Displaying Images from the uSD Card – WYSIWYG RAW....

      How can I control the order of the image files written to the SD card? I’m using uOLED-160-G2

      I have a series of six images that I would like to have stored on the SD card three times sequentially and in the same order. The first series will be images at full brightness, then second series will be identical except slight darkening with 85% transparent black mask, then third series identical to first with 70% transparent black mask.

      The reason is to allow for use in very low light with gfx_Contrast(3) since (2) and below is essentially screen off.

      So when I set my brightness variable to 2 or 1, I want to make my software keep
      gfx_Contrast(3), but then just add to the first series image location offset so that either the second or third series image is picked instead of the first series full brightness ones.

      Basically I want to treat the images like a 6x3 array.

      Since my image files are all identical size I'm hoping to have simple additional offset to access either the 85% or 70% bright image as needed.

      However I cannot do this unless I can control the exact order they are written to the SDcard.

      Hopefully the logic of workshop image writing is known and can be controlled! Thanks
      Last edited by db2wings; 2 weeks ago.


      • #4

        How can I control the order of the image files written to the SD card? I’m using uOLED-160-G2
        To show the image, you only need to specify the address where it is located. As you can see on the application note, it is located on the file.

        If you are using the 'Image Widget', select the image and click paste code. This will allow you to display the image on the display.

        However, you can also use the 'User Images' widget and store the six images you have. Select the image and click the 'Paste' code.
        Change the 'frame' to navigate which picture did you want to show.

        I hope this helps.

        Best Regards,


        • #5
          Thanks for the reply, but I think you misunderstood my question. Maybe I need to clarify that I’m running the uOLED-160-G2 display in serial mode using an Arduino board. I don’t think it matters to our discussion though.

          I need to be able to control what ORDER the images are written to the SDcard by Workshop when I create and compile my Visi project.

          Why? For discussion say I have 9 identically sized images called: A1, B1, C1, A2, B2, C2, A3, B3, & C3.

          The _3 images are unmasked full bright A,B &C images. The _2 images are 15% masked with black to darken them. Then finally the _1 images are 30% masked with black to darken them even further.

          Now If they are written on the SDcard in that exact order listed above then I can figure out the relative offset from A1 to A2 and that it should be the same as the offset from B2 to B3 etc for each of similar “paired” images. I would assign that relative address offset to constant variable called ”RAO”.

          This would then allow me to have six variables (HiA, LoA, HiB, LoB, HiC & LoC) that I initially load with the HIword & LOword addressees of A3, B3, C3, the brightest images from the

          Then if the user selects a brightness level of 3 or more, the program will set gfx_Contrast(3) or higher and use
          combinations of:

          media_SetAdd(HiA, LoA);
          media_Image(x, y);

          to show the unmasked images.

          Then if the user selects a brightness level of 2, the program will set gfx_Contrast(3) as the lowest contrast level it will set, but then
          go to a lower brightness level by decrementing the HiA, LoA, HiB, LoB, HiC & LoC variables by subtracting RAO from them.

          then whenever the
          media_SetAdd(HiA, LoA);
          media_Image(x, y);

          is called the screen stays at contrast level 3, but now
          the media_SetAdd(HiA, LoA); points to the A2 image which is 15% darker than the A3 image.

          If the user sets brightness to 1, then we subtract RAO from the HiA, LoA, HiB, LoB, HiC & LoC variables once again
          to set the pointers to the _1 images which are 30% darker than the A3 images.

          Conversely when brightness level is set back up to higher levels, the HiA, LoA, HiB, LoB, HiC & LoC variables are incremented by RAO each time until the full brightness _3 images are used once again.

          To accomplish this procedure above, I need to understand how the image order on the SDcard is set by the workshop app so I can control what ORDER they are written

          Is it such that when you start a new project that the image files are written to the SDcard in the order that the widgets are created, or is it reverse, or is it alphanumeric by name, or alphanumeric order by alias, or sorted by file size or something else?

          I know I could do this another way, most likely with an array of the actual adreeses being assigned to the HiA, LoA, HiB, LoB, HiC & LoC variables but I thought this might be an efficient way if I could get the files written in the needed order.

          Thanks again for the help!
          Last edited by db2wings; 2 weeks ago.


          • #6

            Thank you for the detailed explanation.

            Can I ask, how is the image placed on the screen? Does the 9 pictures placed on top of each other? Or it is grouped by three's (A, B, C) ?
            If you are using the User Image, you will only need to change the framenumber to navigate to the image on the widget. You can do it like this:
            media_Init(); // initialize the uSD card
            media_SetAdd(iUserimages1H, iUserimages1L); // set the address - the constants
            media_VideoFrame(x, y, framenumber)// change the videoframe
            However, to answer the question the order in which they are placed on the uSD card, depends on the 'Image' widget, as it is indexed from 1 to x (iImage1, iImage2 ...). So the picture placed on the 'iImage1' will be the first in order.

            Best Regards,


            • #7
              Ok thanks for the answer I think that gives me enough to work with, I’ve been changing the name and the aliases of each image to make things more sensical to me, but I’ll let them stay with default names and see what order comes out. Assuming I’m understanding what your wrote of course.

              Click image for larger version

Name:	88F8ADF0-EFBB-49FD-B6AE-4E061D899B3F.jpeg
Views:	17
Size:	768.1 KB
ID:	69896
              Last edited by db2wings; 1 week ago.


              • John Kevin
                John Kevin commented
                Editing a comment
                Basically yes. Even if you rename the Image Widget, the first Image object that you put in the WYSIWYG area will be the first on order. You could also test this, compile the project and check the file