Announcement

Collapse
No announcement yet.

Important info for nodeMCU users

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

    Important info for nodeMCU users

    The nodeMCU is a really good platform for wifi based arduino. It works well with the HS3 Arduino plugin.

    There is something about the nodeMCU that caused me great problems when I was first starting to use it. Since others are starting to express interest in this chip, I thought I should post so that others don't suffer as I did.

    The nature of the problem is that the pin numbers on the physical nodeMCU board do not directly correspond to how you need to reference them in the IDE sketch. When I first started with Arduino, I got an UNO for learning. I highly recommend that everyone just starting out get a vanilla Arduino UNO. I did a few sketches testing some sensors and got them working. Felt pretty good. Then I tried porting them to the nodeMCU. None of the sensors worked. Long story short, with an UNO, if you plug into pin 2 you reference it by 2 in the sketch. With a nodeMCU, if the sketch uses pin 2, you need to plug into pin D4.

    Here is a pic of the cross reference and also a link to an article discussing this. Saved me a bunch of headache once I discovered this.

    Link to article:
    http://henrysbench.capnfatz.com/henr...-input-basics/

    Pic:

    #2
    Great information! Thanks for letting us know.

    Robert
    HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

    Comment


      #3
      Thank you very much for posting it, it will definitely help me a lot and I'm sure others as well.

      Sent from my SM-G935V using Tapatalk

      Comment


        #4
        Also another little trick to watch for is that I have some of the 0.9 NodeMCU versions, I was powering them directly from the 5V pin (rather than use the micro USB) and couldn't figure out why they were misbehaving whereas would work fine on USB power when removed from the board. Turns out there is some cleverness going on with the GPIO lines when powered from USB to automatically handle them so it boots from flash rather than go into it's programming state. Perhaps not the same for every version but sure gave me a headache for a while trying to figure it out.

        Comment


          #5
          Here is another diagram about ESP 8266 nodeMCU pins. There is more info and I'm sure it is important but to be honest I'm not clear about it all.

          Comment


            #6
            logbuilder,

            Could you point me to a good version of the nodeMCU board that you are using. I am just getting starting playing with arduino and order some kits. However, I thought I had ordered wifi and didn't. I may still start with this for some learning, but want a board that has wifi onboard. Is this the one that you are using. I can learn more on my own, but just want to order the correct stuff to play with and it's a bit overwhelming the number of boards and separate wifi modules out there.

            https://www.amazon.com/HiLetgo-Inter...iletgo+esp8266

            Thanks.
            - Tom

            HSPro/Insteon
            Web Site
            YouTube Channel

            Comment


              #7
              Tom, I have ordered those exact NodeMCU units from Amazon and they work very well.These units have WiFi on them and have been very reliable in my setup.

              I have one of the units on top of my gas water heater, it monitors temperature from the area, hot and cold water lines as well as the intake and exhaust for gas area.

              Good luck.
              Billy

              Comment


                #8
                I have 5 of those boards from Amazon and all work perfectly.

                John

                Comment


                  #9
                  Thanks, Billy and John. I ended up ordering a different one,
                  the ESP32. I'm guessing this one will work fine too and if I ordered it right away, I'd be able to get it tomorrow to experiment.
                  Originally posted by bdraper View Post
                  Tom, I have ordered those exact NodeMCU units from Amazon and they work very well.These units have WiFi on them and have been very reliable in my setup.

                  I have one of the units on top of my gas water heater, it monitors temperature from the area, hot and cold water lines as well as the intake and exhaust for gas area.

                  Good luck.
                  - Tom

                  HSPro/Insteon
                  Web Site
                  YouTube Channel

                  Comment


                    #10
                    I ended up buying some ESP-12E boards, they are good and easy to setup as they have the USB socket onboard. I've been playing with these using the Arduino Plugin and the MQTT plugin, they arent too bad.

                    Anyway all good experimentation....

                    Pete
                    HS 2.2.0.11

                    Comment


                      #11
                      Just seeing this thread had me pull out my new nodeMCU and wonder how do I setup the WSID/password to wifi use??
                      HS3PRO 3.0.0.500 as a Fire Daemon service, Windows 2016 Server Std Intel Core i5 PC HTPC Slim SFF 4GB, 120GB SSD drive, WLG800, RFXCom, TI103,NetCam, UltraNetcam3, BLBackup, CurrentCost 3P Rain8Net, MCsSprinker, HSTouch, Ademco Security plugin/AD2USB, JowiHue, various Oregon Scientific temp/humidity sensors, Z-Net, Zsmoke, Aeron Labs micro switches, Amazon Echo Dots, WS+, WD+ ... on and on.

                      Comment


                        #12
                        Originally posted by langenet View Post
                        Just seeing this thread had me pull out my new nodeMCU and wonder how do I setup the WSID/password to wifi use??
                        If you are using this plug-in, they are set up on the config page. You will be offered a spot for SSID and password when you select this board type. The plug-in will generate a sketch containing both.

                        Click image for larger version

Name:	Capture.png
Views:	1
Size:	16.1 KB
ID:	1194573
                        HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                        Comment


                          #13
                          Originally posted by logbuilder View Post
                          The nodeMCU is a really good platform for wifi based arduino. It works well with the HS3 Arduino plugin.

                          There is something about the nodeMCU that caused me great problems when I was first starting to use it. Since others are starting to express interest in this chip, I thought I should post so that others don't suffer as I did.

                          The nature of the problem is that the pin numbers on the physical nodeMCU board do not directly correspond to how you need to reference them in the IDE sketch. When I first started with Arduino, I got an UNO for learning. I highly recommend that everyone just starting out get a vanilla Arduino UNO. I did a few sketches testing some sensors and got them working. Felt pretty good. Then I tried porting them to the nodeMCU. None of the sensors worked. Long story short, with an UNO, if you plug into pin 2 you reference it by 2 in the sketch. With a nodeMCU, if the sketch uses pin 2, you need to plug into pin D4.

                          Here is a pic of the cross reference and also a link to an article discussing this. Saved me a bunch of headache once I discovered this.

                          Link to article:
                          http://henrysbench.capnfatz.com/henr...-input-basics/
                          It is important to note that if you are using the standard sketch (not the API), the pin numbers on the configuration page correspond to the pin numbers one the NodeMCU board. If you want to use "D1" as an output, you configure it as "D1" on the configuration page. If you are using the API, then you need to specify the GPIO pin numbers as shown in the above linked article.
                          HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                          Comment


                            #14
                            Originally posted by rprade View Post
                            If you are using this plug-in, they are set up on the config page. You will be offered a spot for SSID and password when you select this board type. The plug-in will generate a sketch containing both.

                            [ATTACH]65469[/ATTACH]
                            How do I find this option through my plug-in? I installed today, but I just have Arduino and Arduino API to choose from, no option of NodeMCU.

                            Am I missing something?

                            Comment


                              #15
                              Originally posted by TomB View Post
                              How do I find this option through my plug-in? I installed today, but I just have Arduino and Arduino API to choose from, no option of NodeMCU.

                              Am I missing something?
                              What version of the plug-in are you running? You may need to install the beta plug-in.
                              HS4 Pro, 4.2.19.0 Windows 10 pro, Supermicro LP Xeon

                              Comment

                              Working...
                              X