Announcement

Collapse
No announcement yet.

Getting started with Gen4-Iod-32t

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

  • #31
    hello paul ;
    beside wifi is there other ways to connect my iod to an ESP32 module to get data from ESP32 and sow them?
    because as i searched it seems there is no way my esp32 connects to two WiFis

    Comment


    • #32
      Hi,

      You may be able to find this info via a search to list the possible alternative ways to communicate between the 2 devices. Another thing to look at would be the examples in the ESP32 and ESP8266 examples in the Arduino IDE. The ESP-Now is supported on the ESP32 core but doesn't seem to be included on the ESP8266 core and is an external library which should work and there may be an example in the ESP8266 ESP-Now library. This type of support which isn't based entirely on the IoD is a liitle outside of our products normal support but hopefully you should be able to find some good examples out there.

      Best regards

      Paul

      Comment


      • #33
        Hi Paul,

        With you great helps I solve my problems and my project almost finished. But i have few questions :

        1. In my Gen4-Iod-32T i have 5 forms and in each Formi have one gauge, one LEDDigits, one Text & finally two Winbuttons. My problem is when i press the Winbutton to go to next Form it goes slowly (almost took 2 sec after releasing the button). I want to know is there a way to do it faster?

        here is my code in button section (I followed your example that you sent me):


        int state;
        int i;

        if (gfx.touch_Update()) {
        state = gfx.touch_GetPen();
        if (state == TOUCH_PRESSED) {
        i = gfx.imageTouched();
        if (i == iWinbutton1) {
        gfx.UserImages(iWinbutton1, 1);
        pressed = iWinbutton1;
        }
        if (i == iWinbutton2) {
        gfx.UserImages(iWinbutton2, 1);
        pressed = iWinbutton2;
        }
        if (i == iWinbutton3) {
        gfx.UserImages(iWinbutton3, 1);
        pressed = iWinbutton3;
        }
        if (i == iWinbutton4) {
        gfx.UserImages(iWinbutton4, 1);
        pressed = iWinbutton4;
        }
        if (i == iWinbutton5) {
        gfx.UserImages(iWinbutton5, 1);
        pressed = iWinbutton5;
        }
        if (i == iWinbutton6) {
        gfx.UserImages(iWinbutton6, 1);
        pressed = iWinbutton6;
        }
        if (i == iWinbutton7) {
        gfx.UserImages(iWinbutton7, 1);
        pressed = iWinbutton7;
        }
        if (i == iWinbutton8) {
        gfx.UserImages(iWinbutton8, 1);
        pressed = iWinbutton8;
        }
        if (i == iWinbutton9) {
        gfx.UserImages(iWinbutton9, 1);
        pressed = iWinbutton9;
        }
        }
        if (state == TOUCH_RELEASED || state == NOTOUCH) {
        if (pressed == iWinbutton2)showForm2();
        if (pressed == iWinbutton1)showForm1();
        if (pressed == iWinbutton4)showForm3();
        if (pressed == iWinbutton3)showForm1();
        if (pressed == iWinbutton5)showForm4();
        if (pressed == iWinbutton6)showForm1();
        if (pressed == iWinbutton7)showForm5();
        if (pressed == iWinbutton8)showForm1();
        if (pressed == iWinbutton9)showForm2();
        pressed = -1;
        }
        }

        P.S. I dont have any delays in my coding

        Best regards,

        Amir

        Comment


        • #34
          Hi Amir,

          Glad to hear that it's working well. I've just created a similar example and it takes under a second from release of a button to drawing the whole form which is quite normal on the IoD. Would it be possible to send me your complete project to try it here.

          You can zip your whole project in Workshop by clicking on File then Zip Project and send the zip to me.

          Best regards

          Paul

          Comment


          • #35
            yeah i tied just buttons and it runs very fast.

            but in my main project because in a Form there are other images such as iGauge (i think it was mostly because of this graphic item) and other items i think these graphics slows things down.

            Is that right?

            Comment


            • #36
              Yes, that's correct.

              Sometimes it helps to blank the screen by issuing the command

              gfx.Contrast(0);

              then draw the form, and then

              gfx.Contrast(14);

              This way it doesn't show the screen being drawn.

              Best regards

              Paul

              Comment


              • #37
                Hi paule

                i use the contrast and also i reduced my gauges period so my total graphic size reduced and now my speed is better.

                i have another question. i want to know how can i use decimal with leddiggit. i tried it in workshop i could add a decimal point but in my dispaly the decimal point didnot show up.

                Comment


                • #38
                  Hi,

                  Glad to hear that you got your gauges to run faster.

                  I've attached an example for the LEDdigits with decimal, maybe this line is missing from the code

                  gfx.UserImage(iLeddigits1); // Leddigits1 show all digits at 0, only do this once

                  Please compare your code with the example to see if you have shown the LED digits at 0 initially.

                  Best regards

                  Paul
                  Attached Files

                  Comment


                  • #39
                    hi paule

                    thank you for your answer my problem solved as you said i didnt use gfx.UserImage(iLeddigits1).

                    Comment


                    • #40
                      hello paul

                      when i print a static text (gfx.UserImage(iStatictext) ) in my iot 32t and i what to remove it due to my data change or any other reason i just print another black image over it. Is there a better way to clean that user image or any other user images without printing any other image over it (i dont want to use cls because that cleans the whole page)

                      best regards

                      Amir

                      Comment

                      Working...
                      X