OC
OceanRemote
Low-code IoT platform
← Back to Tutorials
← Previous Next →

Tutorial 09: Configuring Board Settings and Upload Speed

📖 What You'll Learn in This Tutorial:
  • ✓ Understanding board configuration options
  • ✓ Optimal settings for ESP8266, ESP32, and Pico W
  • ✓ Choosing the right upload speed for reliable flashing
  • ✓ Troubleshooting upload failures
  • ✓ Saving configurations for your projects

Why Board Settings Matter

Each microcontroller board has configurable parameters that affect performance, stability, and upload reliability. Incorrect settings can cause upload failures, crashes, or unexpected behavior.

OceanRemote firmware is tested with specific settings. Using these recommended values ensures optimal performance.

ESP8266 (D1 Mini / D1 Large) Settings

After selecting your board (Tools → Board → ESP8266 Modules → LOLIN(WEMOS) D1 R2 & mini), configure these settings:

Setting Recommended Value Why
Upload Speed 115200 or 921600 115200 is most reliable. 921600 is faster but may fail with poor cables.
CPU Frequency 80 MHz More stable, lower power consumption. 160 MHz works but not needed.
Flash Size 4MB (FS:2MB OTA:~1019KB) Allows future over-the-air (OTA) updates if needed.
Debug Port Disabled Saves memory and prevents serial interference.
Debug Level None Debug output slows down the device.
lwIP Variant v2 Lower Memory Better memory management for IoT applications.
VTables Flash Saves RAM (critical for ESP8266).
Exceptions Enabled Helps debug crashes.
Erase Flash Only Sketch Preserves EEPROM/SPIFFS data.
💡 Pro Tip:

If you experience frequent upload failures, lower Upload Speed to 115200. This is slower but much more reliable, especially with cheap USB cables.

ESP32 Settings

After selecting your board (Tools → Board → ESP32 Arduino → ESP32 Dev Module), configure these settings:

Setting Recommended Value Why
Upload Speed 921600 ESP32 handles high speeds well.
CPU Frequency 240 MHz (WiFi/BT) Full performance with radio enabled.
Flash Size 4MB (32Mb) Matches most ESP32 boards.
Partition Scheme Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS) Good balance for firmware + data storage.
Core Debug Level None Debug output slows performance.
PSRAM Disabled Enable only if your board has PSRAM (ESP32-WROVER).
Arduino Runs On Core 1 Leaves Core 0 for WiFi stack.
Events Run On Core 1 Matches Arduino core for consistency.
Erase All Flash Disabled Only enable if you need to clear everything.
🔧 PSRAM Note:

If you have an ESP32-WROVER board with PSRAM (4MB external RAM), set PSRAM to Enabled. This gives you extra memory for large applications. Standard ESP32-WROOM boards don't have PSRAM.

Raspberry Pi Pico W Settings

After selecting your board (Tools → Board → Raspberry Pi RP2040 Boards → Raspberry Pi Pico W), configure these settings:

Setting Recommended Value Why
Flash Size 2MB (no FS) OceanRemote firmware fits comfortably.
CPU Speed 133 MHz Default stable speed.
Optimize Small (-Os) (Standard) Reduces firmware size.
RTTI Disabled Saves memory.
Stack Protection Disabled Saves memory.
C++ Exceptions Disabled Saves memory.
Debug Port Disabled Prevents serial interference.
Debug Level None Better performance.
USB Stack Adafruit TinyUSB Most compatible.
IP/Bluetooth Stack IPv4 Only Saves memory, IPv6 not needed.
💡 Pico W Upload Method:

Pico W doesn't use serial upload like ESP boards. Instead, put it in BOOTSEL mode (hold BOOTSEL button while connecting USB). The board appears as a drive, and Arduino copies the UF2 file automatically.

Understanding Upload Speeds

Upload speed determines how fast your firmware transfers to the board. Higher speeds are faster but less reliable:

  • 115200 baud - Most reliable. Works with any USB cable. Slower but never fails.
  • 230400 baud - Good balance. Works with most cables.
  • 460800 baud - Fast. May fail with poor quality cables.
  • 921600 baud - Fastest. Requires good USB cable and proper drivers.
⚠️ Upload Failure Troubleshooting:
  • If upload fails: Lower the upload speed to 115200
  • If still fails: Try a different USB cable (many are charge-only)
  • ESP8266 specific: Hold FLASH button while uploading
  • ESP32 specific: Hold BOOT button while uploading
  • Pico W specific: Ensure you're in BOOTSEL mode (RPI-RP2 drive appears)

Saving Your Configuration

Once you've configured your board settings, you can save them as part of your sketch:

  1. Go to File → Save to save your sketch
  2. The board selection and settings are saved with the sketch
  3. Next time you open the sketch, settings are automatically restored
🔧 Multiple Boards?

Keep separate sketch folders for each board type. OceanRemote firmware is identical across boards, but board settings differ.

Recommended Settings Quick Reference

┌─────────────────────────────────────────────────────────────┐
│                    ESP8266 D1 Mini                          │
├─────────────────────────────────────────────────────────────┤
│ Board:          LOLIN(WEMOS) D1 R2 & mini                   │
│ Upload Speed:   115200 (or 921600 if stable)                │
│ CPU Frequency:  80 MHz                                       │
│ Flash Size:     4MB (FS:2MB OTA:~1019KB)                    │
│ Debug:          Disabled / None                              │
└─────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────┐
│                        ESP32 Dev Module                     │
├─────────────────────────────────────────────────────────────┤
│ Board:          ESP32 Dev Module                            │
│ Upload Speed:   921600                                       │
│ CPU Frequency:  240 MHz (WiFi/BT)                           │
│ Flash Size:     4MB (32Mb)                                  │
│ Partition:      Default 4MB with spiffs                     │
│ PSRAM:          Disabled (enable only if present)           │
└─────────────────────────────────────────────────────────────┘

┌─────────────────────────────────────────────────────────────┐
│                   Raspberry Pi Pico W                       │
├─────────────────────────────────────────────────────────────┤
│ Board:          Raspberry Pi Pico W                         │
│ Flash Size:     2MB (no FS)                                 │
│ CPU Speed:      133 MHz                                      │
│ Optimize:       Small (-Os)                                 │
│ USB Stack:      Adafruit TinyUSB                            │
│ Upload:         BOOTSEL mode (no speed setting)             │
└─────────────────────────────────────────────────────────────┘

Next Steps

With board settings configured, continue with:

  • Tutorial 10: ESP8266 D1 Mini Pinout and Wiring
  • Tutorial 11: ESP8266 D1 Large Pinout and Wiring
  • Tutorial 12: ESP32 Pinout and Wiring Guide
  • Tutorial 13: Raspberry Pi Pico W Pinout and Wiring
  • Return to Tutorial 02: Generate and flash your firmware!
🎯 You're Ready!

Your board settings are now optimized for OceanRemote firmware. You're ready to wire your components and flash your device!