Announcement

Collapse
No announcement yet.

Problem accessing gen4-iod-32T SD Card from Workshop 4

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

  • Problem accessing gen4-iod-32T SD Card from Workshop 4

    Still relatively new to these tools. Environment now is Windows 10 on an Odyssey Mini PC. The problem is that I cannot access the SD Card directly from Workshop4. I've noted comments on other posts about the Comms tab not fully supporting the gen4-IoD series and have simply set the two COM port drop downs to suit my set up (COM 7). The SD Card is the 4GB one that ships with the development kit. I've not tried to re-format it.

    I have been able to load graphics files on to the card by removing it from the gen4 module and transferring it to a card reader on the PC. (Actually, I couldn't get the graphics examples that come with the GFX4d library to work, even though the file names appeared correct, but I did get the WidgetsWSDemo on this forum to work).

    If I try "Comp'n Load" in Workshop4 and click the "uSD Copy" button in the Copy Confirmation dialog, I see a message saying "Please select a uSD drive containing a FAT16 formatted card". If, instead, I click the "FileTransfer Copy" button I see the message "Device on COM7 is not responding. Please that the com port is correct and that a display is plugged in", followed by another dialog saying "FileTransfer failed, run stand alone and check produced messages..."

    Also in Workshop4, the Tools menu shows RMPet, Terminal 9600 and Terminal 115200. Selecting RMPet reports "No Removable Drives Found".

    Overall, it appears that Workshop4 cannot see the uSD card, yet there can't be much wrong with it if I can load the graphics files for the WidgetsWSDemo via my PC and get the program to run. Obviously, having to keep swapping the card between the display and the PC isn't very practical and doing this repeatedly could cause wear or damage to the uSD socket.

    How can I get Workshop4 to access the uSD card?


  • #2
    Hi Colin,

    With the IoD series it isn't possible to access the SD card while it is inserted in the display so all SD card formatting and uploading of graphics needs to be done with the SD card inserted in the PC.

    I have tried one the Workshop demos from the GFX4d library coolgage and there seems to be an issue with it which I will investigate.

    The way to add graphics files from Workshop is to remove the SD card and insert it in the PC as File Transfer is only used in our other range of displays. This is due to the IoD being an Arduino powered device and has no facility to mount and read / write to the SD card over serial via USB.

    The other examples in the GFX4d library can also be uploaded from the Arduino IDE directly. Some examples have an SD Card folder for files that need to be copied to the SD card.

    The IoD can also use the ESP8266 LittleFS File system which allows you to use the flash memory for storing graphics but is only recommended for small projects. The Arduino IDE can be configured to write to this file system so a small GCI & DAT file can be uploaded to the IoDs flash and you won't need the SD card to store GFX files. In order to do this you need to edit a line in GFX4d.h and uncomment

    // #define USE_FS

    and then save the file. You can find out more about the LittleFS file system here.

    https://arduino-esp8266.readthedocs....ilesystem.html
    https://github.com/earlephilhower/ar...ittlefs-plugin

    I hope this helps

    Best regards

    Paul

    Comment


    • #3
      Hi Paul,

      Thanks for your reply. I am making a bit more progress as a result.

      I hope you won't mind me saying that getting started with the gen4-IoD-32T has not been as straightforward as it could have been. Having tried a few weeks ago on a Windows XP platform, got over various hurdles associated with the Arduino IDE and associated tools, I eventually abandoned that when I couldn't get the compiled code to download to the display.

      Moving to a Windows 10 environment (which I purchased specially) and working directly in the Arduino IDE to start with, I was able to get the non-graphics examples that come with the GFX4d library to work. Then with the graphics examples, I copied the .dat and .gci files across to the uSD card (mounted in the PC), inserted the card in the display module and downloaded the code from the Arduino IDE. None of these examples worked.

      At this point, I really didn't know if I was doing something wrong, whether the uSD card wasn't working or whether it was something else entirely. Fortunately, I then came across the WidgetsWSDemo on this forum and tried that, again copying the graphics files manually via the PC and downloading the code to the display via the Arduino IDE. This example worked, indicating (finally) that all was OK with the hardware.

      On moving to Workshop 4, my assumption that keeping the uSD card mounted in the display was a fairly natural one. There are lots of references in the Workshop 4 documentation to using the uSD card on other display modules and the inference, generally, is that they apply to the card mounted in the display. The only place I can see where it specifically states that the uSD card should be mounted in the PC is when using the RMPet utility.

      Unfortunately, the Workshop 4 manual, which refers to many of your other displays specifically, has no mention of the gen4-IoD series, nor the facilities (like the Comms tab) that don't apply. I've checked the datasheet for the gen4-IoD series too and the implication there is that Workshop 4 can be used without any caveats.

      If only there had been a simple statement, somewhere, even in the software itself, to explain that the uSD card would need to be moved to the PC to transfer graphics files to it, it would have helped.

      This highlights the need for better documentation on these displays. When I first powered it up, my display said to refer to the "Getting Started Guide" supplied with the starter kit. There was no such guide supplied with the kit, nor have I been able to find one on your website.

      On a more positive note, I have now got more working, but there are a few more things to note:

      1. When using graphics objects, the names shown in Object Inspector don't work. You have to add an "i" as a prefix. This isn't noted in the library documentation. Fortunately, the examples provide a clue.

      2. I couldn't get any of the Backgrounds or the Primitives to work. They do not get added to the automatically generated *Const.h file.

      3. I tried loading the CoolGaugeIoD example into Workshop 4 and recompiled it for the -32T display. It then worked.

      4. I tried a couple of the other graphics examples that come with the GFX4d library, but as they are Arduino-only (i.e. not Workshop 4 projects), I couldn't do the same with those. No matter, I don't need to spend any more time on them now.

      Apologies for the long post, but I wanted to let you know about some of the problems I've had getting started. Hopefully, it will help others too.

      Best regards,

      Colin

      Comment


      • #4
        Hi Paul,

        By chance I came across the application notes section of your website today. After a little delving, I found what appears to be the Getting Started Guide. Going back to the main GEN4-IoD-32T page on the website, I realise now why I didn't find it before. Scrolling down and selecting the Downloads tab, there is a link to Application Notes under Related Documents. Following that link takes you to the whole library of application notes. Searching for "gen4-iod-32t", "gen4-iod-28t" or "gen4-iod-24t" yields nothing, but searching for "gen4", "iod" or "gen4-iod" yields just one document called "Arduino GFX: Getting Started - First Project." Not quite the title I expected.

        Reading through the document, things now make more sense. If only I'd been able to find it earlier. A direct link called "Getting Started Guide" to this one document would have made things much easier.

        For anyone else struggling to get started with these displays, here's the vital link:
        https://docs.4dsystems.com.au/app-no...ch%5Btopic%5D=

        Having found this document, I now understand the relevance of the Paste Static Code button (which isn't mentioned in the Workshop 4 User Guide) and can see how to reference the widgets that didn't seem to be working for me last week.

        Best regards,

        Colin

        Comment


        • James_4DSystems
          James_4DSystems commented
          Editing a comment
          Thanks Colin - This is a fairly recent App Note, and yes it was not quite right with the keywords, thanks for pointing that out. More have been added and its been added to the Product page too. Its not really a Getting Started Manual like we typically do them, which likely is why it didnt get put on the product page, as its an Appnote. Anyway, hopefully now its a bit more searchable. Thanks for the feedback.

      • #5
        Hello,
        i follow this discuss but on my kit i have an other problem,
        the picture of the usd card don't want to display on the screen !
        i have the text but none picture
        Have you an idea ?
        Regards
        Thierry

        Comment


        • #6
          Hi Thierry,

          Welcome to the forum,

          Would it be possible to send me your project so I can test here. You can zip your project by clicking on File then Zip Project and just send the zip to me.

          Best regards

          Paul

          Comment


          • #7
            Hi,
            the project is your demo project :WidgetsWSDemo
            i just receive the IOD card to day but i don't have the picture on the screen
            i test with 3 usd card but it is the same ...
            teh compile is ok, the file is on the card, but noting, only the text "M"

            Comment


            • #8
              Ok, thanks for letting me know. I will test the Demo and update you as soon as possible. You will find another example in,

              C:\Program Files (x86)\Arduino\libraries\GFX4d\src\Examples\coolgaugeiod

              There are also some other examples in the Arduino IDE Examples/GFX4 section some of which use SD graphics also which need to be copied onto the SD card.

              Best regards

              Paul
              Last edited by pauleilio; 18 June 2021, 06:38 PM.

              Comment


              • #9
                Hi,
                i test the other ewample and it is the same : no picture,
                Regards

                Comment


                • #10
                  Hi,

                  Thank you for the update. The example works fine for me so there may be another issue.
                  The GFX4d lirary has been updated to be compatible with ESP8266 core 3.0.0 so if your core isn't 3.0.0 could you please try to update.
                  When the project compiles and you remove the SD card from the display and insert it into your PC the Copy Confirmation box appears and you click on uSD Copy are there any errors at this stage ?
                  If not and you re-insert the SD card in the IoD do the images appear after a reset or power cycle ?

                  Best regards

                  Paul

                  Comment


                  • #11
                    hi,
                    the version is OK (3.0.0)
                    the GFX is https://github.com/4dsystems/GFX4d
                    no errors and the files are on the SD
                    there is no image before and after reset

                    Regards

                    Comment


                    • #12
                      Ok Thanks

                      Would it be possible to send me a photo of the display on and also an image of the rear of the IoD

                      Comment


                      • #13
                        Click image for larger version

Name:	IMG_20210618_115848_606.jpg
Views:	57
Size:	2.85 MB
ID:	76136
                        Attached Files

                        Comment


                        • #14
                          Thank you for the images, everything looks fine. Could you please try entering the following code and upload to the IoD


                          Code:
                          #include "ESP8266WiFi.h"
                          #include "GFX4d.h"
                          
                          GFX4d gfx = GFX4d();
                          
                          void setup() {
                          
                          gfx.begin();
                          gfx.Cls();
                          gfx.ScrollEnable(true);
                          gfx.BacklightOn(true);
                          gfx.Orientation(PORTRAIT);
                          gfx.SmoothScrollSpeed(5);
                          gfx.TextColor(WHITE); gfx.Font(2); gfx.TextSize(1);
                          if(gfx.CheckSD()){
                          gfx.print("SD Mount Success");
                          } else {
                          gfx.print("SD Mount Fail");
                          }
                          
                          }
                          
                          void loop() {
                          
                          yield();
                          
                          }

                          Comment


                          • #15
                            Hello Paul,
                            the result is SD Mount Fail

                            Comment

                            Working...
                            X