Shop OBEX P1 Docs P2 Docs Learn Events
Building an ESP32 WiFi unit to interface to the P1/P2. — Parallax Forums

Building an ESP32 WiFi unit to interface to the P1/P2.

Seeed makes this small ESP32-C3 unit that I thought I should check out and see how it works

As you can see there is not much to it. Only one LED for power and an external antenna that was hard to plug in.

From the size you can see the antenna is bigger than the unit is.

So, what can we do with this thing anyway? Since the ESP8266 there are a number of ESP32 variations available today. Some that have RISC V as a processor.
This means you need a number of different compilers to make all these units work with the same WiFi hardware on the board.
Well, Espressif has packaged that up into a system that allows you to pick the ESP32 chip you have and set it as the target and will build that program from there. Yes, you can use the same source code and build it for whatever ESP32 chip you have.
The IDF build system takes a little to get use to but pays off in the end. They do have a Visual Studio integration, but I prefer building from the command line.

So, where am I going with this? Well, I have ported over the Parallax WX code over to the ESP32 unit and I am about 90% complete with this. I can use the ESP32 unit to function just like the ESP8266 unit for doing WiFi type projects.

With no header pins installed I was able to solder on a few wires and make this a plug and play device.

With my plug and play system I can use the ESP32 as the primary serial device and load code or plug it into a secondary interface and use it as a secondary serial device as well. This works the same for the P1 or the P2 and now with an ESP32 unit.

One problem I have with this unit is that it does not have a USB interface chip so there is no reset line in use and you have to manually put the unit into boot loader mode to load code. It has a USB C interface that for some reason does not let me send data to it, but I receive data from it. Fortunetly the pins for serial communication work just fine.

I have the same code running on the original ESP32 module which is large enough for me to solder wires onto and now on the ESP32-C3 unit.

Still working on a few thinks such as Bluetooth. Can't do code loading with FlexProp as he is checking the version of the WiFi board and doesn't like my version number.

Mike

Oh, and by the way the ESP32-C3 board cost $2.99.

Comments

  • JonnyMacJonnyMac Posts: 8,957

    Neat project, Mike.

  • The Heltec LoRa 32 is good too

  • iseriesiseries Posts: 1,464

    @DigitalBob , for that I used the Grove-LoRa-E5-STM32WLE5JC board.

    It interfaced nicely to the P1/P2. I have it hooked up to The Things Network.

    Also, the Blues Network Lora board which is only $10. is a great product.

    MIke

  • MicksterMickster Posts: 2,624

    Although I haven't even tested this yet:

    My proposed ESP32 Prop companion

    Craig

  • RS_JimRS_Jim Posts: 1,756

    Ordered a pair going to try them in a point to point application.
    Jim

  • I'm using the Seeed Studio XIAO nRF52840 with BLE for a wearable project, air quality monitors for firefighters. I believe the entire XIAO family comes pre-flashed as Arduino, with configurations to match the on-board hardware, be it BLE or WiFi or both. 11 pins of configurable i/o. Easy peasy if you're satisfied with Arduino. You can reflash to micropython, other options if preferred.

  • I use the ESP32 to initially provide a "captive port" (a button on the unit initiates this). This allows you to pair your phone to configure the unit via a web page rendered from the ESP32 without the need for using BT. Also allows for Android or Apple phones to connect. Once you configure the unit you can close the captive port. From there the ESP32 does all of the processing, usually pushing/pulling MQTT data to a local broker or into a broker in the cloud.

  • Ordered a pair going to try them in a point to point application.

    The ESP32 S3 supports ESP NOW which is a wireless network without Wi-Fi, you can communicate one to one one to many many to one with as many as 20 devices without encryption and something like half of that with encryption.

    Good for remote control, device monitoring. The range is ~400 meters. I believe you can use this network while also using Wi-Fi but not absolutely sure.

  • MicksterMickster Posts: 2,624

    @Unsoundcode said:

    Ordered a pair going to try them in a point to point application.

    The ESP32 S3 supports ESP NOW which is a wireless network without Wi-Fi, you can communicate one to one one to many many to one with as many as 20 devices without encryption and something like half of that with encryption.

    Good for remote control, device monitoring. The range is ~400 meters. I believe you can use this network while also using Wi-Fi but not absolutely sure.

    Details are in the link that I posted previously.

Sign In or Register to comment.