Another ESP32

tmp397FIt seems that ESP32 boards are now coming down in price and increasing in number.

In today’s mailbag, this little number entitled WeMos® TTgo ESP32 WiFi + Bluetooth Board 4MB Flash UNO D1 R32.

This isn’t the cheapest ESP32 out there (though it is not expensive either)  – some of the simpler ones with merely 2 lines of connectors and a USB socket are cheaper – but then they’re not size compatible with Arduino boards (if that is important to you).

I WAS going to gripe that the v1.0.0 board has somewhat un-sharp lettering but I note in the ad that the board is quite readable. So this board has, as well as the microUSB connector, a sizeable power connector as you might see on a UNO board, however it WILL power up successfully simply plugging in the microUSB.

When I turned mine on – as well as the power light – there was the usual BLINK sketch running a blue light. In operation, everything runs, as you might expect, absolutely cold.

I’m using the Arduino IDE version 1.8.5 on Windows 10 64-bit and the ESP by ESP8266 community package 2.3.0 installed.  At this point I realised that the ESP stuff does not include the 32 and that a separate install is needed. Thankfully Banggood provided a link (in their ad) to the official ESP32 section of the Espressif site.  I was somewhat disappointed on initial viewing to see that at the time of writing, it would seem ANALOGWRITE has not been implemented.  Surely, the ESP32 has now been out for some considerable time, you’d think that kind of thing would have long-since been sorted.

Anyway, I followed the instructions here for installing ESP32 under Windows… selected a NANO32 board and 5 minutes later I was all done. I fired up the IDE.  (This is the abbreviated version – at first I figured I’d just download the ZIP file – erm – no – follow the instructions EXACTLY to avoid disappointment).

I ran the blink sketch and – it compiled – absolutely no problem – but no flashing light – clearly the BUILTIN LED wasn’t going to have it… then someone suggested GPIO2 – which is now happily blinking away on my desk!

Today a simple flashing light… tomorrow?

(If you’re reading this around the start of November – see if you can take advantage of Banggood’s discount fair).


32 thoughts on “Another ESP32

  1. Has anyone bought an M5Stack ESP32 kit yet, I just ordered one to have a play with

    Not cheap but it looks a nice piece of kit, very versatile and modular.

    1. i see these devices as educational ones, for young people who want a less steep learning curve… but you’ll never use them in a product, as they cost too much… and the problem is you’re going to miss all the electronic part, having to deal only with software one…

      1. Whilst I can understand you feeling and don’t disagree, sometimes it’s nice to splash out on a toy that will let me write some code that will achieve my goal and the result will look like something that was bought from the shop :-), maybe even my wife would like to use it ……….probably not!
        Don’t get me wrong I have a lathe and other tools and 2 3D printers (one I made myself) I love designing and making things including all aspects of the build but this just looks great and there’s quite a lot of modular addons to play with, once I’ve created something on the M5Stack I can then build it from cheaper parts maybe.

        1. oh, i understand, sure, the “WAF” problem… wife acceptance factor 😀
          and yes, the fact that we use even standard arduinos or esp8266 boards like nodemcu is just for easier DIY, with all we need exposed in pins… when it’s time to move to something more “stable” it’s an other problem 🙂

          this morning was looking at latest John Park’s video about new adafruit products, which have an embedded “scratch like” programming environment… quite cute… it’s nice to start doing real stuff without headaches 🙂

        2. I think Antonio is just referring to the ESP32. The ESP8266 is certainly cheap enough to use in products and unless you need Bluetooth is nearly as powerful as the ESP32. Indeed running at 160Mhz the ESP8266 (ie esp12) can do far more than most folk appear to have achieved with the ESP32. I have several of the latter gathering dust.

          1. actually i thought i wrote it, but it just remained in my head 🙂
            i was talking about low power, mqtt controllable devices, because doing a wifi device which should be battery powered and SMALL it’s just a mess, today…
            something like this, a little gadget which does 1 thing and only that, does it well and lasts long…

            1. I did a very similar thing with my 3D printer to notify me of a finished print via pushbullet, I powered the esp8266 via a microswitch that triggered as the bed returned home and powered up the ESP which connected to the WiFi, sent the message and went to deep sleep.

              I even then bought the changeover reed switches to make a monitor switch for my side gate ….. just never got to finish it …. must dig it out again …now where did I put those parts …. 🙂

  2. Is the main PCB free of planes underneath the antenna of the ESP32? The antenna should be kept clear of ground planes and metal for best reception.

  3. Hi –
    perhaps this video might be along the lines you are interested in.

    ESP32 MicroPython MQTT Tutorial with Raspberry Pi, DHT-22 & OLED

  4. The bests of esp32 are:
    – touch pins
    – deep sleep and various wake up methods
    – BLE
    – DAC
    – 2 processors – no more yeld()

    Unfortunately, except some development boards from bangood and olimex I didn’t find any final product based on esp32. Please post links if you descover any products based on ESP32.

    1. Hmm, touch pins could do on ESP12, deep sleep I DO that on ESP12, the rest – I’ll hand you that – but with all of this – where are the great projects…. if I find any I certainly will post.

        1. The ESP12 has a watchdog timer – and you only need to connect GPIO16 to reset. My software supports sleep for a single snap of up to 7 hours.

          1. The ULP coprocessor mrshark is talking about can do a lot more than the 8266’s though. It’s fully programmable and it can read digital pins and the ADC as well as i2c while the two main cores are in deep sleep. Deep sleep on the 8266 just wakes up whenever the RTC toggles the RST pin via GPIO16, you can’t even wake on pin interrupts.

            I don’t think the ULP is supported by the Arduino IDE at the moment because it requires an extra step to build the assembly language program for the ULP. You have to use the native esp-idf framework, though you can still install Arduino as a submodule and you just have to use your own build toolchain. I prefer that anyway though, Espressif did a great job with esp-idf.

              1. Excellent – as a point of interest – having clarified that the “old” ESP8266 has deep sleep without extra hardware (my software supports it, offering up to 7 hours deep sleep at a stretch)… the ESP8266 can also be speed-doubled by a single instruction with very little current overhead.

              2. Excellent info guys – thanks!

                I found this for the ULP bit
                “ULP (Ultra Low Power) coprocessor is a simple FSM which is designed to perform measurements using ADC, temperature sensor, and external I2C sensors, while main processors are in deep sleep mode.”

                So, you can “sleep” an ESP32 and wake it up dependant on complex logic / sensor values?
                I can see a lot of potential for this, especially as it seems you can wake up one core for the sensor processing and keep it separate from the other core that is handling wifi comms?
                The mind boggles!
                Clearly they have addressed shortcomings of an ESP8266 and gone further here.
                I just wish there was more software easily available for it 🙂
                Major props to Andreas and his videos – they really help us all to fish, and this blog for us to bounce ideas off!

                1. This is good too

                  With the ESP8266 we basically had two possibilities: Either reset the chip from an external source or connect GPIO16 to the reset pin for a timed wake-up. And, with the timer, we were only able to sleep for about one hour.

                  The ESP32 has four different wake-up sources:
                  – The timer
                  – Two possibilities of external Wake-ups
                  – The touch pads
                  – ULP coprocessor wake-up
                  17 pins can also be used by the ULP processor, they are called RTC_GPIOs (RTC_GPIO1 and 2 are not available on the WROOM-32 module).
                  There are also 10 touch sensors.

            1. And support is the thing, Jason – in the process of messing around I realised that the Arduino development environment for the ESP32 does not yet have the PWM commands – now, while there might be ways around that, after this length of time it makes you wonder what else might be missing if you knew more. Your point about sleeping and what you can do is quite valid (though other than simple deep sleep which the ESP8266 can do without extra hardware, I’ve not found myself missing such extra features), proper I2c would certainly by nice – I’ve just been doing a little work on that as I use I2c a lot – and not only have I discovered boards with the I2c pins the opposite way to the way I use them (GPIO4 and 5) I’ve found other boards that use GPIO14 and 2. All of this is because Espressif for whatever reason didn’t put working I2c in the ESP8266 but did it in software and didn’t do a stunningly good job, opening the way to others to do their own thing.

              1. The ESP32 has two hardware i2c modules unlike the 8266, but they are connected to the pin multiplexer so they aren’t actually fixed, which is why some boards say different things. You can change them to whatever pins you want (with a couple limitations), you aren’t locked to the ones they have labeled. It’s not like the 8266 though where you could select different i2c pins because it was in software, they are real hardware i2c. Same is true for most of the other peripherals.

                Regarding PWM, it should be supported. I don’t know exactly why they haven’t implemented analogWrite considering they have an example of how to do PWM, but currently it isn’t really any harder:


                I’m guessing it’s because the ESP32 has both PWM and a sigma-delta DAC, but the github issue about why it hasn’t been implemented doesn’t have any comments on it.

                IMO a lot of the friction is because the Arduino model just isn’t well-suited to the complexity of the ESP32. Right now ESP-IDF (Espressif’s native devkit) is the way to go, it’s really easy to use and well documented, unlike the old days of the 8266 devkit.

                1. Hi JH

                  Well, I’m looking at ESP32s now – when you say “easy to use” is that easy to use for everyone – or easy to use for Linux users. I had a hell of a job initially getting a good working environment on Windows (not interested in emulators) for the ESP8266 until the unofficial development environment came out…. have Espressif put some effort into Windows dev kit this time?

                  1. Err… that’s a very good point. I meant easy for people experienced with embedded development. It’s certainly easier than the ESP8266 SDK was. To be honest I only use it on Linux and it’s easy to get set up, but they have pretty comprehensive instructions for Windows that look relatively straightforward.

                    * Setting up the toolchain – they have a premade package
                    * Integrating with Eclipse

                    It’s definitely harder to set up than one click like in Arduino, but it’s much much easier than a lot of embedded toolkits I’ve used. Espressif has gone through a ton of effort to provide public documentation for ESP-IDF and develop it in the open, it’s the opposite of how the ESP8266 was back in the day.

                    You can also use the rather excellent PlatformIO tool and its editor plugins to do everything including library management.

                    1. I’ll take a look thanks – but trust me – Windows users were left well and truly out in the cold initially – I could not tell you how many hours I put into just getting to the point of being able to compile for the 8266 never mind getting comfortable with making changes… of course now I do that with ease – just in time for Espressif to screw things up by increasing their RAM usage in SDK 2.1 – I’m currently stuck at 2.0 for that reason – not that there is anything wrong with 2.0

  5. Some details about arduino ide and esp32:
    – it works only on Windows 10
    – I tried to compile a basic sketch on window 8 and 7 and it doesn’t compile
    – instead of analogWrite you can use LEDC or SigmaDelta or DAC

    1. Thanks for that Ion, I’d figured that out Ion – but given the amount of time the Arduino/ESP32 project has been running I’d kind of thought that the normal analogWrite function would be there. Indeed I got up this morning and started going through YouTube to see what interesting ESP32 projects there might be out there, a tiny oscilloscope or something… no – with on exception, a clever but ultimately daft implementation of Doom on the 32, pretty much all the projects out there with the exception of Bluetooth projects could easily be implemented on the ESP12.

  6. Hi

    Is that genuine Wemos? could not see it on their site. I have had some trouble with Wemos mini boards that were knock offs. They (Wemos) ask you to buy through their store.


  7. problem with this arduino Uno-like boards: ok, they have the same (idiot with that row of pins “half a pin” shifted and so not perfboard compatible) form factor and so they *should* be compatible with the hundreds of shields available… but then you come to the different powers (are this esp* board 5v tolerant? Who knows…) and features (standard esp8266 has only 1 AD and only 1v tolerant, the esp32 has 6 but only 2 usable for output, while arduino has many of them which can reach 5v)… so, all those analog pins on the bottom right, what are useful for???

Comments are closed.