Announcement

Collapse
No announcement yet.

Getting started with Gen4-Iod-32t

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

  • #16
    Hi Amir,

    Ok, thanks for the information, I will see what I can find as an example

    Best regards

    Paul

    Comment


    • #17
      hi Paule

      i really appreciate your effort.

      I am looking forward for the examples

      Best regards

      Amir

      Comment


      • #18
        Hi Amir,

        I have attached a UDP receiver example for the IoD and a UDP sender for the ESP 32

        Please refer to the comments in the code with regard to Wifi setup and IP addresses on the Sender.

        I hope it helps

        Best regards

        Paul

        Attached Files

        Comment


        • #19
          hi paule

          thanks a lot. I am going to test them now.

          and i have another question as i searched i noticed besides UDP and http POST and GET we have something called ESP NOW to connect to esp together i want to ask you about it and know if ESP NOW is faster?

          Comment


          • #20
            Hi Amir,

            I haven't tried ESP NOW so I couldn't say for sure how ast it is compared to UDP. It does seem to have the advantage of being connectless which is a good thing.

            I will do some testing to see how well it works

            Best regards

            Paul

            Comment


            • #21
              hi Paule,

              thank you so much for your very quick response.

              i learned a lot from your example. but as i read it i understand that in this example Esp32 and Esp8266 both connects to a router for exchanging data.

              But what i need was direct connection between these two Esp without any Router. I mean i send data directly from Esp32 to ESp8266.

              best regards

              Amir
              Last edited by tavoosi; 2 weeks ago.

              Comment


              • #22
                Hi Amir,

                Thanks for the update. I will make some chnges to the example to allow it to work without a router.

                Best regards

                Paul

                Comment


                • #23
                  Hi Amir,

                  I've attached the modified examples below

                  Best regards

                  Paul
                  Attached Files

                  Comment


                  • #24
                    Hi Paule ,

                    Thank you so much for your examples those really help me well.

                    I want to ask you have you tested ESP NOW ?

                    do you have any examples for it?

                    best regards

                    Amir

                    Comment


                    • #25
                      Hi Amir,

                      I have only started looking at ESP NOW for the ESP32 and as yet I haven't got any working examples. I will carry on and hopefully have an example between ESP32 and IoD shortly.

                      Best regards

                      Paul

                      Comment


                      • #26
                        Thank you so much i am looking forward to it.

                        and one another question can I change my IOD back ground colour with sth other than Cls() code? (i dont want other thing to be removed my form)

                        Comment


                        • #27
                          Hi Amir,

                          The IoD can't change the background colour without a Cls(). I can try to make a routine that will change a chosen colour to another for the whole screen, I can't promise that it will be fast enough but I will give it a try and see how it performs.

                          Best regards

                          Paul

                          Comment


                          • #28
                            Hi Amir,

                            I have attached a modified GFX4d library with 2 extra commands.

                            gfx.ReadPixel(x, y);
                            gfx.ChangeColor(ColorToChange, NewColor);

                            Its not very fast and you will need to specify the background colour you want to change from. You could use

                            gfx.ChangeColor(gfx.ReadPixel(0, 0), NewColor);

                            which will use the colour found at 0,0 as the colour to change. If the objects on the screen use the same colour as the background it will change them also so you might have to take this into account when using this command.

                            Example code

                            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);
                              gfx.CircleFilled(100,100,40,RED);
                              gfx.CircleFilled(180,100,40,YELLOW);
                              gfx.print(gfx.ReadPixel(100,100));
                              gfx.CircleFilled(100,200,40,GREEN);
                              gfx.ChangeColor(BLACK, BLUE);
                            }
                            
                            void loop() {
                            
                             yield();
                            
                            }
                            The GFX4d library attached is a pre-release.

                            Best regards

                            Paul
                            Attached Files

                            Comment


                            • #29
                              Hi Amir,

                              I have attached a little faster version and fixed a bug

                              Best regards

                              Paul
                              Attached Files

                              Comment


                              • #30
                                hello Paule

                                sorry for answering late.

                                thank you a lot for your solutions, and i really appreciate your wonder full effort here and i learned a lot from you.

                                my most focus now is on transferring through WIFI so if you could help me with ESP NOW too i really appreciate it.

                                best regards

                                Amir

                                Comment

                                Working...
                                X