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,974

    Neat project, Mike.

  • The Heltec LoRa 32 is good too

  • iseriesiseries Posts: 1,472

    @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,629

    Although I haven't even tested this yet:

    My proposed ESP32 Prop companion

    Craig

  • RS_JimRS_Jim Posts: 1,760

    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,629

    @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.

  • RS_JimRS_Jim Posts: 1,760

    I received my esp32c boards and got the antennas installed. Had to update the Arduino IDE. In trying to get my esp32 up and running, I keep encountering a compile error with the blink sketch. It is looking for a "serial" file that is not found. Any Ideas?
    Jim.

  • @RS_Jim have you seen the following link

    https://wiki.seeedstudio.com/XIAO_ESP32C3_Getting_Started/

    It details the Blink program and mentions different problems you might encounter in a FAQ

  • RS_JimRS_Jim Posts: 1,760

    Thanks,
    I was finally able to get things to compile after their chat bot had me download and install pip3. The basic blink sketch did not work on either of my modules so back to the drawing board.
    Jim.

  • iseriesiseries Posts: 1,472

    After a few firmware updates to the Parallax WX code I substituted this unit for my ESP8266 and found that it uses 10ma less power.

    Newer chip less power.

    I think there is a power option for these chips to set the transmit power, but the WX firmware does not bring this out. Need to look into that.

    Mike

    Remote weather app link: Remote Weather

  • RS_JimRS_Jim Posts: 1,760

    Ok , got the blink sketch working by changing to an i/o pin that was actually accessable on the unit. Have been trying to get the wi-fi working but still struggling with that. Sometimes I see the initial web page from the esp but have not yet successfully configured it to connect to my router.
    Jim

Sign In or Register to comment.