Announcement

Collapse
No announcement yet.

Can't upload to IOD-09TH with 4D-UPA, tutorials?

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

  • Can't upload to IOD-09TH with 4D-UPA, tutorials?

    I have a new SK-IOD-09TH Starter Kit plus a second IOD-09TH, but I can't seem to upload code to them.

    I'm trying to upload the Iod9demo code (I can't find any other demo or tutorials) in both Arduino as well as Workshop 4, but none can connect after compiling.

    The included display turns on and boots to its included screen, and the green LED flashes when any of these are attempting to connect.
    The second display just stays black, though the 4D-UPA green LED still flashes with comms.

    I also have the same results with Arduino on my Mac (after I installed Python and SiLabs drivers...).

    Arduino compiles and gets to the connecting ....____.... screen, LED on the board is flashing, but it eventually times out.

    Workshop 4 just compiles to Completed RC=1 after nothing seems to happen, though when I scroll up I do see
    Code:
    Connecting...
    File "C:\Users\Josh Wardell\AppData\Local\Arduino15\packages\esp8266\hardware\esp8266\2.6.3/tools/upload.py", line 65, in <module>
    esptool.main(cmdline)
    File "C:/Users/Josh Wardell/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 2890, in main
    esp.connect(args.before)
    File "C:/Users/Josh Wardell/AppData/Local/Arduino15/packages/esp8266/hardware/esp8266/2.6.3/tools/esptool\esptool.py", line 483, in connect
    raise FatalError('Failed to connect to %s: %s' % (self.CHIP_NAME, last_error))
    esptool.FatalError: Failed to connect to ESP8266: Timed out waiting for packet header
    An error occurred while uploading the sketch
    _
    I do have COM3 Arduino comms selected, which does blink the led and goes away when I disconnect from USB.

    I've tried pressing, repeatedly as well as holding down the Flash button, but it makes no difference.

    Any suggestions?

    Also, any recommendations for first time tutorials and example code? I couldn't even find any applicable app notes on the site.

  • #2
    Hi,

    Welcome to the forum

    Sorry to hear you're having problems uploading to your IoD-09.

    It's possible the latest core for the ESP8266 might be causing an issue. Could you please try installing ESP8266 2.6.2 core.

    Another recent change to the core has also caused an issue so you will need to use the attached modified library.

    Please let me know if you still have problems after changing the ESP8266 core.

    The way to set the IoD manually for flashing is hold down reset and then hold down flash, relaese reset and then release flash.

    Best regards

    Paul

    Attached Files

    Comment


    • #3
      This might be helpful as an example to try

      https://www.hackster.io/4DMakers/iod...t-watch-b2b9cd

      Comment


      • #4
        After some more time searching, I found a suggestion to solder in sip sockets. Not that I had any, but I mangled a DIP socket cut in half, soldered and plugged in the display.
        Workshop 4 still doesn't work, but Arduino connected and uploaded instantly!
        (Wow, that's kind of bad... these should be included, and some clear instructions, considering this was bought as a kit)

        The Graphics Demo lists wifi, connects to my network, then crashes just after "Connecting to 4D Systems" and starts over.
        The serial port monitor gives this error and dumps a stack:
        Exception (28):
        epc1=0x40205cf6 epc2=0x00000000 epc3=0x00000000 excvaddr=0x00000000 depc=0x00000000

        I noticed in the code
        gfx.PrintImageWifi("http://hosting.4dsystems.com.au/IoDFiles/iod9.gci");
        The server is not found. And the file doesn't exist at www.4dsystems.

        So I commented that line out and the demo continues running just fine (some other things do nothing like user image and LED characters)

        So the one demo refers to a server that doesn't exist? And the whole thing crashes if it can't retrieve a file? That's pretty bad...


        Paull thanks for suggesting another project, I will take a look at that too. Is that modified GFX library the same as the latest on GitHub or is it more recent?

        Comment


        • #5
          Hi,

          The staggered thru holes usually provide a good connection so very sorry to hear you had an issue with yours..

          Sorry about the missing files on the server. We changed our website recently and it is a technical problem. We will look into adding other examples that don't rely on downloading any files from the server..

          When you say it doesn't work in Workshop, do you mean the IoD is not detected. If this is the case it is quite normal as Workshop only uses this feature for our other display types. The com port setting is all you need to do and if the Arduino IDE works fine then Workshop should work fine too..

          In the more recent cores the SD library was dropped for the SDfat library. GFX4D accomodated for this but the now more recent cores have had another change which stopped the fix from working so there is a small modification in the one I sent you but the rest of it is essentially the same.

          Best regards

          Paul

          Comment


          • #6
            Hi,

            I've attached IoD9 data files to save to your SD card and a modified version of the demo. It will still connect to your Wifi but won't attempt to download files.

            We are currently testing the latest ESP8266 core and will update the library on Github as soon as testing is complete.

            Best regards

            Paul
            Attached Files

            Comment


            • #7
              Thanks for the help. I see not much has changed except for some comms config.

              I'm just looking to use the display for mostly large text, but I can't seem to get it to draw anything but the base font.

              gfx.Cls();
              gfx.TextSize(1);
              gfx.Font(FONT1);
              gfx.TWprintln("Font 1");
              gfx.Font(FONT2);
              gfx.TWprintln("Font 2");
              delay(1000);
              gfx.TextSize(2);
              gfx.TWprintln("Size 2");
              gfx.TextSize(3);
              gfx.TWprintln("Size 3");
              delay(1000);

              All four lines print in the same font and size.

              Also, is there a way to load in custom fonts?
              Is there a different graphics or text library that will work?

              Comment


              • #8
                Hi,

                The Text Window doesnt support sizeable fonts but the standard print function does. Text Window is used a s an automatic scrolling text entry window whereas the print function allows you to print anywhere on the screen

                Changing the code to this,

                gfx.Cls();
                gfx.TextSize(1);
                gfx.Font(FONT1);
                gfx.println("Font 1");
                gfx.Font(FONT2);
                gfx.println("Font 2");
                delay(1000);
                gfx.TextSize(2);
                gfx.println("Size 2");
                gfx.TextSize(3);
                gfx.println("Size 3");
                delay(1000);

                Will display the different sizes.

                The IoD doesn't support custom fonts but there is the static text widget in Workshop 4 that uses any font.

                Best regards

                Paul

                Comment


                • #9
                  Is there any way to use a larger font that is not scaled, even if it requires me editing the library? These tiny fonts scaled up to the full height of the display look terrible.
                  I don't want to have to use the SD card, it seems any use of the workshop requires making widgets saved to the SD, is there a way around that?

                  Perhaps I could make custom characters, they are limited to a 32 width, but do they have a height limit?

                  Has anyone attempted getting the adafruit GFX library working on this?

                  Comment


                  • #10
                    Hi,

                    Editing the library won't help you. The IoD has a complex text printing routine that takes advantage of the displays hardware scroll whilst in portrait mode. The user character is an option and the height is extendable beyond 32 pixels if there is no wish to use the SD card.

                    The IoD was designed as an intelligent display that utilizes the SD card for for creating complex graphical projects. The adafruit GFX library isn't SD based but if you don't need to use the SD card then there is no reason why you wouldn't be able to convert their library to run on the IoD.

                    Paul

                    Comment


                    • #11
                      4D workshop still won't connect when using compile and load, but that's fine, I can switch over to Arduino and load the generated info and upload it there.

                      I did generate a few custom digits LEDs with full display height fonts, and they work and look great, however:

                      I get a red X in a red box with negative signed numbers, or when using LeadingBlanks.
                      If I enable LeadingZero in 4D workshop, compile generates an error that the project enhancement is not enabled. What does that mean?
                      Is there any way for the led numbers to display a decimal point?
                      For example, do I just need to export a bitmap with 0 to 9, along with a - and . and a blank?

                      Comment


                      • #12
                        Hi,

                        You should be able to do this in Workshop 4 if the coreect Installer version of the Arduino IDE was installed and the Arduino IDE is on the same drive generally in C;\Program Files (x86)\Aduino, could you please let me know if it is any different.

                        If you click on the Project tab in Workshop 4 you will notice on the very left, an option to turn on -ve and leading blanks for your custom digits. If you still have an issue could you plaes send me the project and I will try it here.

                        Best regards

                        Paul

                        Comment


                        • #13
                          Excellent, it is all working now, except for the custom digits are sliced wrong no doubt because I need to export those additional characters. I don't think there are examples so can you confirm, do I trail the 0-9 with - and blank?

                          I don't think the LED routines handle decimals so I assume it is up to me to handle splitting it and drawing a dot.

                          Thanks again Paul for your very quick and helpful responses!

                          And if anyone in the community knows what config is needed to get Adafruit or other font-capable GFX library (I don't expect 4D to support that) it would be appreciated.

                          For the most part my project doesn't need graphics, just "big" numbers full size on this tiny display, perhaps with a few letters (For example as a speed gauge 100mph). The hardware is perfect for what I need, so it's just a matter of me finding the most reasonable software to accomplish this (as well as wifi connection between two controllers).
                          I'd still prefer not to use the SD card, so I will still explore custom characters or hacking a different GFX library, but at least now what I have working with customLEDs could be good enough.

                          Comment


                          • #14
                            Hi,

                            This forum post may help

                            https://forum.4dsystems.com.au/node/47828

                            As the IoD is an Arduino device it will be possible to make it do exactly what you need it to. I will give it some thought over the next day or two to see if theres a way around large nice text.

                            Best regards

                            Paul

                            Comment


                            • #15
                              I'm trying to communicate to an I2C device, but I instead get a corrupted display...has anyone seen that before?
                              The documentation doesn't seem to mention which of pins 10 and 12 are SDA and SCL, and I worry that the library has not actually properly set up I2C.

                              I'm attempting to communicate with an Adafruit barograph, which essentially uses the code

                              Code:
                              #include <Wire.h>
                              #include <Adafruit_GFX.h>
                              #include "Adafruit_LEDBackpack.h"
                              Adafruit_24bargraph bar = Adafruit_24bargraph();
                              ...
                              bar.begin(0x70); // pass in the address
                              ...
                              bar.writeDisplay();
                              The display corrupts as soon as bar.begin is executed, without any hardware even being connected yet (I sure wish the UPA passed those pins through to something!)

                              I would expect there to be display issues with SPI not I2C.

                              Click image for larger version  Name:	IMG_0443.jpeg Views:	1 Size:	159.8 KB ID:	71671

                              Comment

                              Working...
                              X