Announcement

Collapse
No announcement yet.

ESP8266 - Proof of Concept

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

    Originally posted by AllanMar View Post
    Sounds like the common problem mentioned before.

    You either have to manually patch UdpContext.h as I mentioned to FernadoSolanes or now you can use the "staging" version of the ESP8266 lib (until a new release with this bug fixed is released anyway).
    https://github.com/esp8266/Arduino/c...dde63b42fa38ed

    Boards manager link (2.3.0-rc1): http://arduino.esp8266.com/staging/p...com_index.json
    AllanMar,
    yes, solved. The problem is related to UdpContext.h

    Thanks a lot for your support!
    If you will be in Italy a day, I'll offer you a beer (homemade)

    Comment


      Originally posted by khriss75 View Post
      AllanMar,
      yes, solved. The problem is related to UdpContext.h

      Thanks a lot for your support!
      If you will be in Italy a day, I'll offer you a beer (homemade)
      No problem.
      haha, perhaps someday. I'm a home brewer as well.

      Comment


        Pin IN

        Only to be clear (for safety), whit arduino, if I select an INPUT pin, the internal pull Up is enabled (the pin is at 5V). To have a "closed" I put the pin to GND.

        On nodemcu, setting an input pin, the internal pull up is not activate (the pin remain to 0V.

        I'm correct?

        Checking with a scope, seems that I'm right, (no pullup enabled on input pin).

        Comment


          Originally posted by khriss75 View Post
          Only to be clear (for safety), whit arduino, if I select an INPUT pin, the internal pull Up is enabled (the pin is at 5V). To have a "closed" I put the pin to GND.

          On nodemcu, setting an input pin, the internal pull up is not activate (the pin remain to 0V.

          I'm correct?

          Checking with a scope, seems that I'm right, (no pullup enabled on input pin).
          Pullup should be enabled, although it will be 3.3V on ESP8266.
          What pin are you using? Perhaps it's one that can't support it?

          Comment


            Originally posted by AllanMar View Post
            Pullup should be enabled, although it will be 3.3V on ESP8266.
            What pin are you using? Perhaps it's one that can't support it?
            I tested GPIO16-5-4.

            As specified here: http://blog.falafel.com/programming-...-with-nodemcu/ only GPIO16 shouldn't have internal pullup, but no 3.3V also on other pin (5 and 4).

            Can you verify?

            OUTPUT pins works fine (3.3V ON, 0V OFF).

            This evening I'll retry.

            Comment


              Checked and re-checked but nothing.

              Output works well, example, GPIO2 (D4) works and change from 0 to 3.3V when as output in change the ON/OFF from HS.

              Same pin, I set as INPUT, checking with scope there are 0V (no internal pullup enabled). I tried adding an external pullup, ok, now on the scope I have 3.3V, putting the pin to GND, on the scope I read 0V (ok) but the status on HS don't change.

              Strange.

              Any idea?

              Comment


                Originally posted by khriss75 View Post
                Checked and re-checked but nothing.

                Output works well, example, GPIO2 (D4) works and change from 0 to 3.3V when as output in change the ON/OFF from HS.

                Same pin, I set as INPUT, checking with scope there are 0V (no internal pullup enabled). I tried adding an external pullup, ok, now on the scope I have 3.3V, putting the pin to GND, on the scope I read 0V (ok) but the status on HS don't change.

                Strange.

                Any idea?
                I havent had a chance to try anything, and my trial for this plugin is expired but try changing:
                Code:
                      pinMode(Byte4, INPUT);
                      digitalWrite(Byte4, HIGH);
                To
                Code:
                      pinMode(Byte4, INPUT_PULLUP);
                Either is fine on Arduino, but perhaps this is an ESP8266 quirk...

                Comment


                  Originally posted by AllanMar View Post
                  I havent had a chance to try anything, and my trial for this plugin is expired but try changing:
                  Code:
                        pinMode(Byte4, INPUT);
                        digitalWrite(Byte4, HIGH);
                  To
                  Code:
                        pinMode(Byte4, INPUT_PULLUP);
                  Either is fine on Arduino, but perhaps this is an ESP8266 quirk...
                  Hi Allan,
                  already tested this last night, before read your message and... you are right!

                  yes, nodemcu needs
                  Code:
                  pinmode(pin, INPUT_PULLUP)
                  in order to enable internal pull up.
                  Now the pins reacts correctly.

                  Comment


                    cant get it connected in HS

                    Went though the forum and got it working to the point that I can ping it but it will not connect in HS, any ideas what I cancheck why it is not connecting. I've applied all patching as per instructuions and still no go. I have two devices one with DHT22 API code and another one just as Normal both I can ping, no pocket loss but it will not connect. All on the same network/subnet no routing.

                    Any sugestions what to do next?

                    Mark

                    Comment


                      Originally posted by marekd1 View Post
                      Went though the forum and got it working to the point that I can ping it but it will not connect in HS, any ideas what I cancheck why it is not connecting. I've applied all patching as per instructuions and still no go. I have two devices one with DHT22 API code and another one just as Normal both I can ping, no pocket loss but it will not connect. All on the same network/subnet no routing.



                      Any sugestions what to do next?



                      Mark


                      What does the serial console say

                      Comment


                        Originally posted by AllanMar View Post
                        What does the serial console say
                        The console is blank no errors showing. At this point I've tried so many things I do not know what fixed it. So here is the new update. Got it conencted to HS3, this is good but I am unable to see data from the DHT.

                        I am using the WeMos DTH22 which is connecting to D4. I've edited the sketch to peg pin4 #define DHTPIN 4. checked the power on the board all looks fine. I can not see the data stream so I am not sure what is actually being sent from the board. I guess I would need to send it to serial first and see if anything is being sent. Is there another way to see it on the HS3 side what is being received?

                        Mark
                        BTW thanks for the quick reply.

                        another update... enabled serial.print and I am getting "nan" as a return after reading both humidity and temp.

                        any ideas what would be causing that?
                        Last edited by marekd1; June 9, 2016, 08:30 PM.

                        Comment


                          Post your sketch and i'll have a look.
                          I don't have the plugin anymore, but it doesnt sound like thats your problem.

                          Comment


                            Originally posted by marekd1 View Post
                            The console is blank no errors showing. At this point I've tried so many things I do not know what fixed it. So here is the new update. Got it conencted to HS3, this is good but I am unable to see data from the DHT.

                            I am using the WeMos DTH22 which is connecting to D4. I've edited the sketch to peg pin4 #define DHTPIN 4. checked the power on the board all looks fine. I can not see the data stream so I am not sure what is actually being sent from the board. I guess I would need to send it to serial first and see if anything is being sent. Is there another way to see it on the HS3 side what is being received?

                            Mark
                            BTW thanks for the quick reply.

                            another update... enabled serial.print and I am getting "nan" as a return after reading both humidity and temp.

                            any ideas what would be causing that?
                            Actually...
                            D4 is GPIO2 (confusing I know)

                            So either:
                            #define DHTPIN 2
                            or
                            #define DHTPIN D4

                            should work.

                            Comment


                              Perfect, thanks you for the info. I will play some more.

                              Regards
                              Mark

                              Comment


                                Originally posted by marekd1 View Post
                                Perfect, thanks you for the info. I will play some more.

                                Regards
                                Mark
                                That definitely did the trick. Thank you. One more question: I tried to use Offset to compensate for the error in reading without any results. What is the proper usage for the Offset setting for both positive and negative compensation in the reading?

                                Thank you
                                Mark

                                Comment

                                Working...
                                X