Stufin
Home Quick Cart Profile

Raspberry Pi Pico W

Buy Now on Stufin

Microcontroller

Dual-core Arm Cortex-M0+ processor running at up to 133 MHz

Wireless Connectivity

Wi-Fi and Bluetooth 5.0 for wireless communication and internet access

Memory

264KB of SRAM and 2MB of flash memory for storing programs and data

Interfaces

+ 2 x UART (serial communication)

+ 2 x SPI (serial peripheral interface)

+ 1 x I2C (inter-integrated circuit)

+ 16 x PWM (pulse-width modulation) outputs

+ 3 x ADC (analog-to-digital converter) inputs

GPIO

26 x multi-function GPIO pins, including 3 x analog inputs and 16 x digital outputs

Power

Powered by a micro-USB connection, with an optional external power supply

Operating System

Supports C, C++, and MicroPython programming languages

Dimensions

51 x 21 mm (2.0 x 0.8 inches)

Weight

3.5 grams (0.12 ounces)

Applications

The Raspberry Pi Pico W is suitable for a wide range of applications, including

IoT projects and prototyping

Robotics and automation

Home automation and smart home devices

Wearable electronics and wearable devices

Industrial control and monitoring systems

Educational and research projects

Advantages

Cost-effective and highly capable microcontroller solution

Wireless connectivity for seamless communication and internet access

Large community and extensive documentation for easy development and support

Compatible with a wide range of peripherals and accessories

Typical Use Cases

Developing IoT projects that require wireless connectivity, such as smart home devices or environmental monitoring systems

Creating robots and automated systems that require real-time processing and wireless communication

Building wearable devices that require low-power consumption and wireless connectivity

Prototyping and testing ideas for industrial control and monitoring systems

By providing a powerful microcontroller with wireless connectivity, the Raspberry Pi Pico W offers a unique combination of features and capabilities that make it an ideal choice for a wide range of applications.

Pin Configuration

  • Raspberry Pi Pico W Pinout
  • The Raspberry Pi Pico W is a microcontroller board that features 40 GPIO (General Purpose Input/Output) pins, along with other interfaces and peripherals. Here's a detailed explanation of each pin, categorized by function:
  • GPIO Pins (0-39)
  • These pins can be used for digital input/output, analog input, PWM (Pulse Width Modulation), I2C (Inter-Integrated Circuit), SPI (Serial Peripheral Interface), and UART (Universal Asynchronous Receiver-Transmitter) communication.
  • 1. GP0: GPIO pin 0, can be used as a digital input/output, or as an analog input (ADC channel 0).
  • 2. GP1: GPIO pin 1, can be used as a digital input/output, or as an analog input (ADC channel 1).
  • 3. GP2: GPIO pin 2, can be used as a digital input/output, or as an analog input (ADC channel 2).
  • 4. GP3: GPIO pin 3, can be used as a digital input/output, or as an analog input (ADC channel 3).
  • 5. GP4: GPIO pin 4, can be used as a digital input/output, or as a UART TX (transmit) pin.
  • 6. GP5: GPIO pin 5, can be used as a digital input/output, or as a UART RX (receive) pin.
  • 7. GP6: GPIO pin 6, can be used as a digital input/output, or as an I2C SCL (clock) pin.
  • 8. GP7: GPIO pin 7, can be used as a digital input/output, or as an I2C SDA (data) pin.
  • 9. GP8: GPIO pin 8, can be used as a digital input/output, or as a SPI CSn (chip select) pin.
  • 10. GP9: GPIO pin 9, can be used as a digital input/output, or as a SPI SCK (clock) pin.
  • 11. GP10: GPIO pin 10, can be used as a digital input/output, or as a SPI MOSI (master out slave in) pin.
  • 12. GP11: GPIO pin 11, can be used as a digital input/output, or as a SPI MISO (master in slave out) pin.
  • 13. GP12: GPIO pin 12, can be used as a digital input/output.
  • 14. GP13: GPIO pin 13, can be used as a digital input/output.
  • 15. GP14: GPIO pin 14, can be used as a digital input/output.
  • 16. GP15: GPIO pin 15, can be used as a digital input/output.
  • 17. GP16: GPIO pin 16, can be used as a digital input/output, or as a PWM output.
  • 18. GP17: GPIO pin 17, can be used as a digital input/output, or as a PWM output.
  • 19. GP18: GPIO pin 18, can be used as a digital input/output, or as a PWM output.
  • 20. GP19: GPIO pin 19, can be used as a digital input/output, or as a PWM output.
  • 21. GP20: GPIO pin 20, can be used as a digital input/output.
  • 22. GP21: GPIO pin 21, can be used as a digital input/output.
  • 23. GP22: GPIO pin 22, can be used as a digital input/output.
  • 24. GP23: GPIO pin 23, can be used as a digital input/output.
  • 25. GP24: GPIO pin 24, can be used as a digital input/output.
  • 26. GP25: GPIO pin 25, can be used as a digital input/output.
  • 27. GP26: GPIO pin 26, can be used as a digital input/output, or as an ADC channel 4.
  • 28. GP27: GPIO pin 27, can be used as a digital input/output, or as an ADC channel 5.
  • 29. GP28: GPIO pin 28, can be used as a digital input/output, or as an ADC channel 6.
  • 30. GP29: GPIO pin 29, can be used as a digital input/output, or as an ADC channel 7.
  • 31. GP30: GPIO pin 30, can be used as a digital input/output.
  • 32. GP31: GPIO pin 31, can be used as a digital input/output.
  • 33. GP32: GPIO pin 32, can be used as a digital input/output.
  • 34. GP33: GPIO pin 33, can be used as a digital input/output.
  • 35. GP34: GPIO pin 34, can be used as a digital input/output.
  • 36. GP35: GPIO pin 35, can be used as a digital input/output.
  • 37. GP36: GPIO pin 36, can be used as a digital input/output.
  • 38. GP37: GPIO pin 37, can be used as a digital input/output.
  • 39. GP39: GPIO pin 39, can be used as a digital input/output.
  • Power Pins
  • 40. VIN: Input voltage pin, can be used to power the board (3.3V to 5.5V).
  • 41. 3V3: 3.3V regulated output, can be used to power external components.
  • 42. GND: Ground pin, used for circuit referencing.
  • USB Interface
  • 43. USB_D+: USB data plus pin, used for USB communication.
  • 44. USB_D-: USB data minus pin, used for USB communication.
  • 45. USB_VBUS: USB voltage bus pin, used for powering USB devices.
  • Wireless Interface (Wi-Fi and Bluetooth)
  • 46. WLAN_ANT: Wireless local area network (WLAN) antenna connection.
  • 47. BT_ANT: Bluetooth antenna connection.
  • LED Indicators
  • 48. PWR Led: Power LED indicator.
  • 49. Wi-Fi Led: Wi-Fi status LED indicator.
  • 50. Busy Led: Busy/processing LED indicator.
  • Reset Pin
  • 51. RUN: Reset pin, active low. Pull low to reset the microcontroller.
  • Debug Interfaces
  • 52. UART_TX: UART transmit pin, used for serial debugging.
  • 53. UART_RX: UART receive pin, used for serial debugging.
  • 54. SWDIO: Serial Wire Debug (SWD) I/O pin, used for debugging and programming.
  • 55. SWCLK: Serial Wire Debug (SWD) clock pin, used for debugging and programming.
  • When connecting the pins, make sure to follow these guidelines:
  • Use a breadboard or a PCB to connect components, if necessary.
  • Use jumper wires or PCB traces to connect pins to components.
  • Ensure correct polarity when connecting components, especially for power and signal lines.
  • Use pull-up or pull-down resistors as needed for GPIO pins.
  • Use decoupling capacitors for power lines, if necessary.
  • Follow the datasheet and documentation for each component being connected.
  • Remember to always refer to the official Raspberry Pi Pico W documentation and datasheet for more detailed information on pinout, usage, and safety guidelines.

Code Examples

Raspberry Pi Pico W Documentation
Overview
The Raspberry Pi Pico W is a microcontroller board developed by Raspberry Pi, a UK-based organization. It is an upgraded version of the Raspberry Pi Pico, featuring Wi-Fi connectivity. The Pico W is a compact, low-cost, and highly capable board that can be used for a wide range of IoT projects.
Key Features
MicroPython support
 Wi-Fi connectivity
 Dual-core Arm Cortex M0+ processor
 264KB of SRAM
 2MB of flash storage
 26 GPIO pins
 USB 1.1 host and device
 Supports I2C, I2S, SPI, and UART protocols
Code Examples
### Example 1: Connecting to Wi-Fi and sending HTTP Requests
In this example, we will demonstrate how to connect to a Wi-Fi network and send an HTTP request using the Raspberry Pi Pico W.
```python
import rp2
import network
import urequests
# Initialize Wi-Fi
wlan = network.WLAN(network.STA_IF)
wlan.active(True)
# Connect to Wi-Fi network
wlan.connect('your_wifi_ssid', 'your_wifi_password')
# Wait for connection
while not wlan.isconnected():
    pass
print('Connected to Wi-Fi')
# Send HTTP request
response = urequests.get('http://example.com')
# Print response
print(response.text)
```
Replace `'your_wifi_ssid'` and `'your_wifi_password'` with your actual Wi-Fi network credentials.
### Example 2: Reading Analog Values from a Sensor using ADC
In this example, we will demonstrate how to read analog values from a sensor using the ADC (Analog-to-Digital Converter) on the Raspberry Pi Pico W.
```python
import machine
# Initialize ADC pin
adc = machine.ADC(26)  # ADC pin 26
while True:
    # Read analog value
    value = adc.read_u16()
# Convert value to voltage
    voltage = value  3.3 / 65535
# Print voltage
    print('Voltage:', voltage)
# Delay for 1 second
    machine.sleep(1)
```
In this example, we are using ADC pin 26 to read analog values from a sensor. The `read_u16()` method returns a 16-bit unsigned integer value, which we then convert to a voltage value using the formula `voltage = value  3.3 / 65535`.
### Example 3: Communicating with an I2C Device
In this example, we will demonstrate how to communicate with an I2C device using the Raspberry Pi Pico W.
```python
import machine
# Initialize I2C bus
i2c = machine.I2C(0, sda=machine.Pin(16), scl=machine.Pin(17), freq=400000)
# Define I2C device address
device_addr = 0x1A
# Write data to I2C device
i2c.writeto(device_addr, b'x01x02x03')
# Read data from I2C device
data = i2c.readfrom(device_addr, 3)
# Print data
print(data)
```
In this example, we are using the I2C bus to communicate with a device at address `0x1A`. We write the bytes `b'x01x02x03'` to the device and then read 3 bytes from the device.
These examples demonstrate the capabilities of the Raspberry Pi Pico W and show how it can be used in various IoT applications.