ESP-SimHub FirmwareBoard Configuration

Board Configuration

Configure your board settings in the platformio.ini file based on your ESP board type.

There are multiple environments in the platformio.ini file, you’ll need to configure the correct one, and switch to it in VSCode.

ESP8266 Configuration

If you’re using an ESP8266 board, go to VSCode status bar and switch to the ESP8266 environment.

Go to the status bar and tap the environment switcher

Go to the status bar and tap the environment switcher

Select the ESP8266 environment

Select the ESP8266 environment

The environment is now set to ESP8266

The environment is now set to ESP8266

Go to platformio.ini and find the ESP8266 environment

[common]
lib_deps =
	... lots of libraries here
 
 
#############################################
#  ESP8266
#
#############################################
[env:esp8266]
{This is the esp8266 environment}
 
#############################################
# ESP32
#
#############################################
;[env:esp32]
{This is the esp32 environment, ignore this}
 

Configure your esp8266 environment with your board type:

[env:esp8266]
platform = espressif8266
board = nodemcuv2     ; See supported boards below; ex: d1_mini
framework = arduino
# set by simhub serial supporting code, if using wifi you can set this to 115200 and use it for debugging
monitor_speed = 19200 # 115200 if using wifi and want serial output

Find your board type in the PlatformIO ESP8266 Boards Database.

ℹ️

If you can’t find your specific board in the PlatformIO Boards Database, pick a similar board with the same microcontroller (e.g., ESP32 or ESP8266). Most of the time, the differences are minimal and can be adjusted in the configuration.

ESP32 Configuration

For ESP32 boards, go to VSCode status bar and switch to the ESP32 environment.

Go to the status bar and tap the environment switcher

Go to the status bar and tap the environment switcher

Select the ESP32 environment

Select the ESP32 environment

The environment is now set to ESP32

The environment is now set to ESP32

Go to platformio.ini and find the ESP32 environment

[common]
lib_deps =
	... lots of libraries here
 
 
#############################################
#  ESP8266
#
#############################################
;[env:esp8266]
{Ignore this one}
 
#############################################
# ESP32
#
#############################################
[env:esp32]
{Configure this one}
 

Configure your esp32 environment with your board type:

[env:esp32dev]
platform = espressif32
board = esp32dev      ; See supported boards below, ex: wemos_d1_mini32, esp32doit-devkit-v1, seeed_xiao_esp32c3
framework = arduino
# set by simhub serial supporting code, if using wifi you can set this to 115200 and use it for debugging
monitor_speed = 19200 # 115200 if using wifi and want serial output

Find your board type in the PlatformIO ESP32 Boards Database.

ℹ️

If you can’t find your specific board in the PlatformIO Boards Database, pick a similar board with the same microcontroller (e.g., ESP32 or ESP8266). Most of the time, the differences are minimal and can be adjusted in the configuration.

COM Port Configuration

ℹ️

Most of the time, PlatformIO will automatically detect your board’s COM port. Manual configuration is only needed if you experience connection issues or if you have multiple boards actively connected (not recommended, as you may upload firmware to a device other than the target).

If you need to manually specify the COM port, add this to your board’s environment:

[env:esp32 or esp8266]
... other configs here
upload_port = COM4
 

To find your board’s COM port:

  1. Open Device Manager in Windows
  2. Look under “Ports (COM & LPT)”
  3. Connect your board and note which new COM port appears

Additional Resources

Outdated video but still relevant for platformio.ini setup: