Announcement

Collapse
No announcement yet.

Quick ? - Is anyone else interested in ESP32 and/or OTA?

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

  • Quick ? - Is anyone else interested in ESP32 and/or OTA?

    I have an interest in learning more and possibly implementing two new items.

    First is the ESP32. This should be a strong replacement for the ESP8266. If you don't know about this board, here is a link that explains it and compares it to the ESP8266 (nodeMCU).

    https://www.youtube.com/watch?v=jhjZZkKupk8

    Second is OTA (Over The Air) updating. This is the ability to load a new sketch into a board without actually attaching it to a computer. It uses wifi to do the update.

    Anyone else working on, or interested in, either of these?
    Last edited by logbuilder; July 27th, 2017, 03:30 AM. Reason: Just realized I had not included a link that I referenced. Fixed.

  • #2
    I picked up one on the Sparkfun ESP32 boards about 6 months ago and have to say I was disappointed. Getting the dev tools up & running was not nearly as straightforward as the ESP8266 and seems like a lot of stuff is still unimplemented (see attached from Sparkfun hookup guide). I got everything working, but the darn think would crash randomly while the same program on the 8266 would chug along for days. Perhaps its better now, it is still pretty new.
    Attached Files

    Comment


    • #3
      That's good input.

      I've seen some of the older youtube ESP32 videos talk about a pretty complicated board install. My board got delivered a couple of days ago. I got the board definitions and libraries from github and it was pretty straight forward to install. Worked first time using several of the example sketches.

      https://github.com/espressif/arduino-esp32

      So far I've found some differences. I use the nodeMCU API sketch so any things I mention are in that context.

      The ESP8266Wifi.h include has to be changed to WiFi.h and UDP_TX_PACKET_MAX_SIZE has to be defined.

      I've changed it to this:
      Code:
      #define BoardESP32 1                  // changes required for ESP32
      #define BoardESP8266 0                // changes required for ESP32
      
      #if BoardESP32 == 1                   // changes required for ESP32
        #include <WiFi.h>                   // changes required for ESP32
        #define UDP_TX_PACKET_MAX_SIZE 24   // changes required for ESP32
      #endif                                // changes required for ESP32
               
      #if BoardESP8266 == 1                 // changes required for ESP32
         #include <ESP8266WiFi.h>           // changes required for ESP32
      #endif                                // changes required for ESP32
      It compiles good and I can run it somewhat. But I'm away from my HS3
      location so I really can't test connectivity to the plugin but it does look promising.

      Comment


      • #4
        I'm back at my home location so I was able to do some quick testing of the ESP32 with the API sketch.

        Did a fresh compile and loaded the board with my standard sketch that I use in all my Arduinos. I did make the changes noted above in regards to libraries. Then I attached it to HS3.

        My standard sketch does two basic things that I thought would be a good first test. Upon starting the sketch, a device called Heartbeat is updated and then every 5 minutes thereafter. A second device called Wifi dBm is updated with the wifi signal strength and then every 7 minutes thereafter.

        I started the sketch and boom, everything is updating just fine. I'm quite surprised. I haven't attached any devices yet. I have to study more about how they are numbered on the board and what pin to use in the sketch.

        It looks very promising so far. There are quite a few more available pins, more memory, and Bluetooth LE. I think there is potential for some low energy devices.

        Anyway, just thought I would report back.

        Edit (4 hours later): This board seems to run a little hot. It is about 10 deg F above ambient temp. Ambient is about 78 F and board measures 87 F. Measured with laser thermometer.
        Last edited by logbuilder; July 27th, 2017, 03:24 AM. Reason: New info

        Comment


        • #5
          @zwolfpack or anyone with knowledge of this topic.

          I'm having a problem getting my head around something. Since you have worked with the ESP32 before, I'm hoping you can help.

          I started on an UNO. Then moved to the ESP8266. Now the ESP32. Its the pinouts I'm unclear on.

          As example, pin 13 on the UNO is called D7 on the ESP8266. That means that a sketch written for the UNO and referencing pin 13 will run on the 8266 if I attach the sensor to pin D7. But what is the ESP32 equivalent? I need to be able to cross reference uno pins 4, 2, 12, 13, 16, 5.

          I've got this chart but it is just not sinking in. Do you have an easy way to think about it?

          Comment


          • #6
            This might help

            There is a guy on youtube that has many 8266 videos and he is starting to make videos for the esp32. In this video, he has created a spreadsheet that maps all the pins. It is still complicated, but it may be of some help.

            https://www.youtube.com/watch?v=r75MrWIVIw4

            Comment


            • #7
              Thanks jimbell. I've seen this guy before and really like him. Will download and watch soon.

              Comment


              • #8
                Just watched the video. I'm getting closer but it is still a bit murky. He referenced another video that I will watch also.

                Also very interesting is his discussion of deep sleep. As he was discussing my mind went to creating battery powered door/window sensors. That's probably a good weekend project.

                Comment


                • #9
                  Originally posted by logbuilder View Post
                  I need to be able to cross reference uno pins 4, 2, 12, 13, 16, 5.
                  I believe the corresponding pins on the ESP32 are simply IO4, IO2, IO12, IO13, IO16, IO5.

                  Comment


                  • #10
                    Originally posted by zwolfpack View Post
                    I believe the corresponding pins on the ESP32 are simply IO4, IO2, IO12, IO13, IO16, IO5.
                    So if I want to set the pinMode on IO4 I would use pin 24??

                    ie. pinMode(24,INPUT)

                    Here is another diagram that confuses me even more. It is what leads me to think 24.

                    https://raw.githubusercontent.com/go...C%20pinout.png

                    Comment


                    • #11
                      For IO4 I think it would be pinMode(4, INPUT)

                      Comment


                      • #12
                        Originally posted by logbuilder View Post
                        On that diagram, the gray pins (inside row) are the pins on the processor chip itself. So those are for reference only and can safely be ignored.

                        Processor chip datasheet: http://www.espressif.com/sites/defau...tasheet_en.pdf

                        Pin layout on page 6.

                        More reference material... datasheet for the ESP-WROOM-32 module, which contains the chip above: http://www.espressif.com/sites/defau...tasheet_en.pdf

                        Comment


                        • #13
                          Thanks. I guess I was making too much of the gray pin #s.

                          At this point I am just testing the ESP32. No real project in mind. My nodeMCU API sketch runs on it and I am able to update HS3 devices. It did require some changes in terms of libraries. I just haven't added any sensors.

                          Comment


                          • #14
                            In regards to OTA updating, since I have 10 nodeMCUs installed all around my property, this is important. I've taken an example OTA sketch and have tested it and it works. Then I migrated into my API sketch and it is compiling clean. Not at my home location so I will have to wait to the weekend to test more. All in all, looks promising. With this much looking so good, I'm fully expecting to have it working in the next few days.

                            Anyone else find OTA to be important to them? It is going to require changes to the base API sketch so I'm hoping Greig is receptive to making changes.

                            Comment


                            • #15
                              I am very much interested

                              Originally posted by logbuilder View Post
                              In regards to OTA updating, since I have 10 nodeMCUs installed all around my property, this is important. I've taken an example OTA sketch and have tested it and it works. Then I migrated into my API sketch and it is compiling clean. Not at my home location so I will have to wait to the weekend to test more. All in all, looks promising. With this much looking so good, I'm fully expecting to have it working in the next few days.

                              Anyone else find OTA to be important to them? It is going to require changes to the base API sketch so I'm hoping Greig is receptive to making changes.
                              Count me in. I am very interested in both ESP32 support and the OTA. Keep us posted as you progress in the OTA effort.

                              Comment

                              Working...
                              X