Using the Arduino adapters on an ESP32 - fredlcore/BSB-LAN GitHub Wiki
If for some reason you need to move from the Arduino Mega or Due to an ESP32 microcontroller (for example to use WiFi instead of Ethernet), then you can still use some of the Arduino adapters also on the ESP32, if you can live with connecting the ESP32 and the adapter "on the fly" using jumper wires.
Arduino Due adapter (with EEPROM chip)
All you need to do is connect four lines between the adapter and the ESP32: RX1, TX1, VCC/3V3 and GND. All one-to-one. The RX1/TX1/GND pins are clearly marked on the Due adapter, and the location of the VCC pins can be taken from any Arduino Due board specification (it's basically in the opposite corner of the GND pin):
On the ESP32 NodeMCU, either use pins 16 for RX1 and 17 for TX1, or, if you use a non-30pin-compatible board, choose any free two pins you like and enter them in bus_pins in BSB_LAN_config.h.
Please note that this does not work the other way round, i.e. using an ESP32 adapter on the Arduino Due, because the Due needs the EEPROM chip that is only part of the BSB-LAN adapter for the Arduino Due.
Arduino Mega adapter (with "RasPi" header)
You can also use the second generation of the adapter that has a section to make it work to run on a Raspberry Pi.
You would have to add all missing parts (named on the board), open solder jumper SJ1 and close solder jumper S2 and S3.
Then proceed by connecting the pins on the "RasPi" header one-to-one with the ESP32:
| RasPi header pin | ESP32 pin |
|---|---|
| 06 | GND |
| 08 | TX |
| 10 | RX |
| 12 | 3V3 |
You can't use the ESP32 adapters on the the Mega, this time because the Mega runs on 5V, whereas the ESP32 runs on 3.3V.
Arduino Mega adapter (first generation)
Those first-generation BSB-LAN adapters that do not have the "RasPi" header are not compatible with the 3.3V architecture of the ESP32. You would have to make or order a new adapter board.
Again, you can't use the ESP32 adapters on the the Mega, for the same reasons as stated before.