OC
OceanRemote
Low-code IoT platform
Back to Troubleshooting Hub

Pico W GPIO Not Working

Your Raspberry Pi Pico W GPIO pins don't respond to digitalWrite() or digitalRead(). Some pins work but others don't. This guide covers pin numbering , voltage level issues, PWM conflicts, and common wiring mistakes for the RP2040.

Last updated: April 22, 2026 | 12 min read

Symptoms

  • digitalWrite() has no effect on specific GPIO pins
  • Pin stuck HIGH or LOW regardless of code
  • GPIO pins 0-21 work but 22-28 don't
  • PWM not working on some pins
  • ADC pins not reading analog values correctly
  • Pin works in one sketch but not another
  • GPIO pins 23-25 not working . Wait verify: Pico W onboard LED is on GPIO25 . But may be reserved. Use GPIO0-22 for general I/O. GPIO23-24 are used for WiFi control on Pico W . GPIO25 may be LED. GPIO26-28 are ADC only . GPIO29 is VSYS sense . Use GPIO0-22 for output. For relay control, use GPIO0-22. GPIO23-24 are for WiFi .
  • ADC pins not reading analog values correctly
  • Pin works in one sketch but not another

Common Causes

  1. Physical Pin vs GPIO Number Confusion Most common mistake. Physical pin numbers are NOT GPIO numbers. GPIO0 is on physical pin 1, GPIO1 on pin 2, etc.
  2. Using Reserved GPIO Pins GPIO23 and GPIO24 are used for WiFi control DO NOT USE for general I/O. GPIO25 may be LED or reserved
  3. ADC Pins are Input Only Cannot use analog pins as digital outputs
  4. 3.3V vs 5V Logic Mismatch Pico W is 3.3V device. Connecting 5V signals can damage pins or cause erratic behavior
  5. Missing pinMode() Call Pins not explicitly set as INPUT or OUTPUT
  6. PWM Channel Conflicts Each PWM slice has two channels . Using same slice on different pins causes conflicts
  7. I2C/SPI/UART Peripheral Conflicts Default peripheral pins may be in use by other functions

Pico W GPIO Pin Reference

GPIO Physical Pin Function Status Recommendation
GPIO01General purpose SafeOK for relays, sensors
GPIO12General purpose SafeOK for relays, sensors
GPIO24General purpose SafeOK for relays, sensors
GPIO35General purpose SafeOK for relays, sensors
GPIO46General purpose SafeOK for relays, sensors
GPIO57General purpose SafeOK for relays, sensors
GPIO69General purpose SafeOK for relays, sensors
GPIO710General purpose SafeOK for relays, sensors
GPIO811General purpose SafeOK for relays, sensors
GPIO912General purpose SafeOK for relays, sensors
GPIO1014General purpose SafeOK for relays, sensors
GPIO1115General purpose SafeOK for relays, sensors
GPIO1216General purpose SafeOK for relays, sensors
GPIO1317General purpose SafeOK for relays, sensors
GPIO1419General purpose SafeOK for relays, sensors
GPIO1520General purpose SafeOK for relays, sensors
GPIO1621General purpose SafeOK for relays, sensors
GPIO1722General purpose SafeOK for relays, sensors
GPIO1824General purpose SafeOK for relays, sensors
GPIO1925General purpose SafeOK for relays, sensors
GPIO2026General purpose SafeOK for relays, sensors
GPIO2127General purpose SafeOK for relays, sensors
GPIO2229General purpose SafeOK for relays, sensors
GPIO23-WiFi Control AVOIDReserved for WiFi
GPIO24-WiFi Control AVOIDReserved for WiFi
GPIO25-Onboard LED LimitedLED only, may cause issues
GPIO2631ADC0 Input onlyCannot use as output
GPIO2732ADC1 Input onlyCannot use as output
GPIO2834ADC2 Input onlyCannot use as output
GPIO2935VSYS sense Input onlyReads input voltage

Recommended GPIOs for relays: 0-22 . GPIO0-1 are UART0 . Avoid if using Serial Monitor with default USB? Actually Pico W uses USB for Serial, not UART0. UART0 are free for general use unless you explicitly use Serial1. GPIO12-13 are SPI, GPIO14-15 are UART1, GPIO16-17 are SPI1, GPIO18-19 are I2C0, GPIO20-21 are I2C1, GPIO22 is free. You can reassign peripherals. But for simple GPIO , any GPIO0-22 works. Avoid GPIO23-24 , GPIO26-29 .

Step-by-Step Fixes

1. Verify GPIO Number vs Physical Pin

Most common mistake using physical pin numbers instead of GPIO numbers:

//  WRONG - Physical pin numbers 
// pinMode;  // This is NOT GPIO1
// digitalWrite;
//
//  CORRECT - Use GPIO numbers
// GPIO0 is on physical pin 1
// GPIO1 is on physical pin 2
// GPIO2 is on physical pin 4
// etc.

const int relayPin = 11;  // GPIO11 

void setup() {
  pinMode;
}

void loop() {
  digitalWrite;  // Relay ON
  delay;
  digitalWrite;   // Relay OFF
  delay;
}

2. Avoid Reserved GPIO Pins

GPIO23 and GPIO24 are used for WiFi control DO NOT use:

  • GPIO23, GPIO24 Reserved for CYW43439 WiFi/Bluetooth chip
  • GPIO25 Onboard LED
  • GPIO26-28 ADC only
  • GPIO29 VSYS sense
  • Use GPIO0-22 for general purpose I/O

3. Test GPIO with Diagnostic Sketch

Test all usable GPIO pins systematically:

// GPIO Test for Pico W 
const int testPins[] = {0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22};
const int numPins = 23;

void setup() {
  Serial.begin;
  delay;
  Serial.println;
  
  for  {
    pinMode;
    digitalWrite;
    Serial.print;
    Serial.print;
    Serial.println;
    delay;
    digitalWrite;
    Serial.print;
    Serial.print;
    Serial.println;
    delay;
  }
  Serial.println;
}

void loop() {}

4. Check Voltage Levels

Pico W is NOT 5V tolerant:

  • Maximum input voltage on GPIO: 3.3V
  • Applying 5V will damage the pin or entire RP2040
  • Use level shifter for 5V sensors
  • For 5V relay modules, signal pin is 3.3V tolerant
  • Measure voltage on output pin with multimeter should be 0V or 3.3V

5. Check PWM Channel Conflicts

Each PWM slice has two channels . Using same slice for different pins causes conflicts:

// PWM Slices :
// Slice 0: GPIO0 , GPIO1 
// Slice 1: GPIO2 , GPIO3 
// Slice 2: GPIO4 , GPIO5 
// Slice 3: GPIO6 , GPIO7 
// Slice 4: GPIO8 , GPIO9 
// Slice 5: GPIO10 , GPIO11 
// Slice 6: GPIO12 , GPIO13 
// Slice 7: GPIO14 , GPIO15 
//
//  Conflict: Using GPIO4 and GPIO5 together 
//  No conflict: Using GPIO4 and GPIO6 

void setup() {
  analogWrite;  // Slice 2A
  analogWrite;  // Slice 2B - same slice, works but may have quirks
  analogWrite;  // Slice 3A - different slice, no conflict
}

6. Check Peripheral Conflicts

Default peripheral pins may conflict:

  • I2C0: GPIO0 , GPIO1
  • I2C1: GPIO2 , GPIO3
  • SPI0: GPIO4 , GPIO5 , GPIO6 , GPIO7
  • SPI1: GPIO10 , GPIO11 , GPIO12 , GPIO13
  • UART0: GPIO0 , GPIO1
  • UART1: GPIO4 , GPIO5
  • If not using these peripherals, pins can be used as GPIO
  • If using peripherals, avoid using those pins for other purposes

7. Use pull-up/pull-down resistors for inputs

Floating inputs cause erratic readings:

// Enable internal pull-up/pull-down resistors
void setup() {
  // Pull-up 
  pinMode;
  
  // Pull-down 
  pinMode;
  
  // External 10k resistor also works
}

void loop() {
  if  == LOW) {
    // Button pressed 
  }
}

Prevention Tips

  • Always use GPIO numbers, NOT physical pin numbers
  • Use GPIO0-22 for general I/O
  • Remember Pico W is 3.3V never apply 5V to GPIO pins
  • Use pinMode() before any digitalRead/digitalWrite
  • Enable internal pull-ups for input pins
  • Check pinout diagram before wiring
  • Test each pin with simple blink sketch before final assembly

Related Issues

Frequently Asked Questions

Q: Why does my Pico W GPIO work in Arduino but not in MicroPython?

A: Pin numbering differs between environments. Arduino uses GPIO numbers. MicroPython may use physical pin numbers or different mapping. Always check documentation for your specific environment.

Q: Can I use GPIO23 or GPIO24 for relays?

A: No. GPIO23 and GPIO24 are reserved for WiFi/Bluetooth control . Using them may cause WiFi instability or damage. Use GPIO0-22 instead.

Q: My Pico W GPIO pin works at first but stops after a few minutes. Why?

A: Power supply issue or overheating. WiFi transmission draws current peaks that can cause voltage drops affecting GPIO output. Add 470-1000F capacitor across VBUS and GND. Also check if pin is configured as INPUT accidentally.

Still having GPIO issues? Contact Support or return to the Troubleshooting Hub.