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

Tutorial 04: Installing Arduino IDE and Board Support

📖 What You'll Learn in This Tutorial:
  • ✓ Downloading and installing Arduino IDE on Windows, Mac, and Linux
  • ✓ Adding ESP8266 board support
  • ✓ Adding ESP32 board support
  • ✓ Setting up Raspberry Pi Pico W in Arduino IDE
  • ✓ Installing required libraries (DHT, OneWire, DallasTemperature)
  • ✓ Configuring board settings for each device

Step 1: Download and Install Arduino IDE

The Arduino IDE (Integrated Development Environment) is where you'll write, compile, and upload code to your boards. It's free, open-source, and works on all major operating systems.

Windows Installation

  1. Go to https://www.arduino.cc/en/software
  2. Download the Windows installer (exe file)
  3. Run the installer and follow the prompts
  4. Important: When asked about drivers, click "Install"
  5. Launch Arduino IDE from the Start Menu or Desktop shortcut

macOS Installation

  1. Download the macOS version (Apple Silicon or Intel depending on your Mac)
  2. Open the downloaded zip file
  3. Drag the Arduino app to your Applications folder
  4. Launch Arduino IDE from Applications
  5. If you get a security warning, go to System Preferences → Security & Privacy → Open Anyway

Linux Installation (Ubuntu/Debian)

  1. Download the Linux 64-bit version
  2. Extract the archive: tar -xvf arduino-*.tar.xz
  3. Run the install script: sudo ./install.sh
  4. Launch Arduino IDE from the terminal or application menu
💡 Alternative: Linux users can also install via Snap: sudo snap install arduino

Step 2: Adding ESP8266 Board Support

The ESP8266 is not included in Arduino IDE by default. You need to add the board manager URL.

  1. Open Arduino IDE
  2. Go to File → Preferences (Windows/Linux) or Arduino IDE → Settings (Mac)
  3. In the "Additional Boards Manager URLs" field, paste:
https://raw.githubusercontent.com/esp8266/Arduino/master/package_esp8266com_index.json
  1. Click OK
  2. Go to Tools → Board → Boards Manager
  3. Search for "esp8266"
  4. Find "esp8266 by ESP8266 Community" and click Install
  5. Wait for installation to complete (may take a few minutes)
🔧 After Installation:

You'll now see ESP8266 boards under Tools → Board → ESP8266 Modules. Select your board (e.g., "NodeMCU 1.0 (ESP-12E Module)" for D1 Mini).

Step 3: Adding ESP32 Board Support

  1. Go to File → Preferences
  2. Add the ESP32 URL to "Additional Boards Manager URLs". If you already have the ESP8266 URL, separate them with a comma:
https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json

Your URLs should look like:

https://raw.githubusercontent.com/esp8266/Arduino/master/package_esp8266com_index.json,https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_index.json
  1. Click OK
  2. Go to Tools → Board → Boards Manager
  3. Search for "esp32"
  4. Find "esp32 by Espressif Systems" and click Install
  5. Wait for installation (can take 5-10 minutes, the package is large)
💡 Pro Tip: The ESP32 package includes many board variants. For most projects, select "ESP32 Dev Module" or your specific board (e.g., "LOLIN D32").

Step 4: Setting Up Raspberry Pi Pico W

The Raspberry Pi Pico W requires a special setup. Unlike ESP boards, it uses a different core.

  1. Go to File → Preferences
  2. Add the Raspberry Pi Pico URL to "Additional Boards Manager URLs":
https://github.com/earlephilhower/arduino-pico/releases/download/global/package_rp2040_index.json
  1. Click OK
  2. Go to Tools → Board → Boards Manager
  3. Search for "pico" or "rp2040"
  4. Find "Raspberry Pi Pico/RP2040 by Earle F. Philhower" and click Install
  5. After installation, select Tools → Board → Raspberry Pi RP2040 Boards → Raspberry Pi Pico W
⚠️ Important for Pico W:

Make sure you select the "Raspberry Pi Pico W" specifically, not the regular "Raspberry Pi Pico". The "W" version has WiFi capability.

Step 5: Installing Required Libraries

OceanRemote firmware uses several libraries for sensors and communication. Install them via the Library Manager.

ArduinoJson (Required for all devices)

  • Go to Sketch → Include Library → Manage Libraries
  • Search for "ArduinoJson"
  • Install "ArduinoJson by Benoit Blanchon" (version 6.x or 7.x)

DHT Sensor Library (For DHT22/DHT11)

  • Search for "DHT sensor library"
  • Install "DHT sensor library by Adafruit"
  • Also install "Adafruit Unified Sensor" (dependency)

OneWire and DallasTemperature (For DS18B20)

  • Search for "OneWire"
  • Install "OneWire by Jim Studt"
  • Search for "DallasTemperature"
  • Install "DallasTemperature by Miles Burton"
📚 Library Summary:
Library Purpose Required For
ArduinoJson Parse JSON data from server All boards
DHT sensor library Read DHT22/DHT11 sensors When using DHT22
OneWire 1-Wire communication protocol When using DS18B20
DallasTemperature Read DS18B20 temperature When using DS18B20

Step 6: Board Configuration Settings

For ESP8266 (D1 Mini / D1 Large)

  • Board: "NodeMCU 1.0 (ESP-12E Module)" or "LOLIN(WEMOS) D1 R2 & mini"
  • Upload Speed: 115200 (or 921600 for faster uploads)
  • CPU Frequency: 80 MHz or 160 MHz (160 MHz is faster but uses more power)
  • Flash Size: 4MB (FS:2MB OTA:~1019KB)
  • Debug Port: Disabled
  • Debug Level: None
  • lwIP Variant: v2 Lower Memory
  • VTables: Flash
  • Exceptions: Enabled
  • Erase Flash: Only Sketch
  • Port: Select your COM port (Windows) or /dev/cu.usbserial-* (Mac) or /dev/ttyUSB0 (Linux)

For ESP32

  • Board: "ESP32 Dev Module" or your specific board
  • Upload Speed: 921600
  • CPU Frequency: 240 MHz (WiFi/BT)
  • Flash Size: 4MB (32Mb)
  • Partition Scheme: Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS)
  • Core Debug Level: None
  • PSRAM: Disabled
  • Port: Select your COM port

For Raspberry Pi Pico W

  • Board: "Raspberry Pi Pico W"
  • Flash Size: 2MB (no FS) or 2MB (FS:1MB)
  • CPU Speed: 133 MHz
  • Optimize: Small (-Os) (Standard)
  • RTTI: Disabled
  • Stack Protection: Disabled
  • C++ Exceptions: Disabled
  • Debug Port: Disabled
  • Debug Level: None
  • USB Stack: Adafruit TinyUSB
  • IP/Bluetooth Stack: IPv4 Only
  • Port: Select your port (usually /dev/cu.usbmodem* on Mac, COM* on Windows)
💡 Finding Your Port:
  • Windows: Look for COM3, COM4, etc. in Device Manager under "Ports (COM & LPT)"
  • Mac: Look for /dev/cu.usbserial-* or /dev/cu.usbmodem-*
  • Linux: Look for /dev/ttyUSB0 or /dev/ttyACM0

Step 7: Testing Your Setup

Before flashing OceanRemote firmware, test your setup with a simple blink sketch:

void setup() {
  pinMode(LED_BUILTIN, OUTPUT);
}

void loop() {
  digitalWrite(LED_BUILTIN, HIGH);
  delay(1000);
  digitalWrite(LED_BUILTIN, LOW);
  delay(1000);
}
  1. Select your board and port
  2. Click the Verify button (checkmark) to compile
  3. Click the Upload button (right arrow)
  4. Watch for "Done uploading" message
  5. The built-in LED should blink every second
⚠️ Troubleshooting:
  • "Board not found" - Check your port selection and USB cable
  • "Permission denied" (Linux) - Run sudo chmod 666 /dev/ttyUSB0
  • "Timeout" (ESP8266) - Hold the FLASH button while uploading
  • "No serial port" (Pico W) - Put the board in BOOTSEL mode (hold BOOTSEL while connecting USB)

Next Steps

Now that your Arduino IDE is ready, continue with:

  • Tutorial 05: Adding ESP8266 Board Support (detailed)
  • Tutorial 06: Adding ESP32 Board Support (detailed)
  • Tutorial 07: Setting Up Raspberry Pi Pico W (detailed)
  • Tutorial 08: Installing Required Libraries (detailed)
  • Tutorial 09: Configuring Board Settings (detailed)
🎯 You're Ready!

Your Arduino IDE is now configured for ESP8266, ESP32, and Raspberry Pi Pico W. You're ready to generate and flash OceanRemote firmware.