Skip to main content

wokwi-nano-rp2040-connect Reference

Raspberry Pi RP2040-based board with WiFi + Bluetooth support in Arduino Nano form factor.

Pin names#

PinRP2040 PinFunctions
RX0UART RX
TX1UART TX
D225
D315
D416
D517
D618
D719
D820
D921
D105
D117SPI MOSI
D124SPI MISO
D136SPI SCK, LED
A026
A127
A228
A329
A412*I2C SDA
A513*I2C SCL
A6*
A7*
VCCVCCPositive voltage (5V)
GNDGNDGround

* Pins A4…A7 are connected through the u-blox NINA W102 WiFi/BT module. They are only capable of analog / digital input. Pins A4/A5 also support I2C communication.

On board LEDs#

The board includes two standard LEDs and one RGB LED:

LEDColorFunction
ONGreenPower LED. Always on while the simulation is running
LYellowConnected to pin D13
RGBAllConnected to 3 internal pins: LEDR, LEDG, LEDB

If you want to use the RGB LED in your code, you'll need to include to WiFiNINA.h library. Here is a complete example:

#include <WiFiNINA.h>
void setup() {
pinMode(LEDR, OUTPUT);
pinMode(LEDG, OUTPUT);
pinMode(LEDB, OUTPUT);
}
void loop() {
digitalWrite(LEDR, HIGH);
delay(250);
digitalWrite(LEDR, LOW);
digitalWrite(LEDG, HIGH);
delay(250);
digitalWrite(LEDG, LOW);
digitalWrite(LEDB, HIGH);
delay(250);
digitalWrite(LEDB, LOW);
}

Simulation features#

The Arduino Nano RP2040 Connect is simulated using the RP2040js Library. Please see the wokwi-pi-pico docs for a complete list of supported features.

WiFi Support#

The simulation includes partial WiFi support. You can scan for networks, connect to an access point, and even define your own access point (and connect to it from another simulation running in a browser tab). Actual data exchange (e.g. opening a TCP connection) hasn't been implemented yet. Expect some updates soon!

The simulator also provides two built-in access points:

Name (SSID)BSSIDDescription
Wokwi-GUEST42:13:37:55:aa:01Open WiFi network (no password required)
Wokwi-Club42:13:37:55:aa:02Club-only WiFi network

You can connect to these access point from your code:

#include <WiFiNINA.h>
void setup() {
Serial1.begin(115200);
while (WiFi.status() != WL_CONNECTED) {
Serial1.println("Connecting to Wokwi-GUEST...");
WiFi.begin("Wokwi-GUEST");
delay(1000);
}
Serial1.print("Connected! IP Address: ");
Serial1.println(WiFi.localIP());
}
void loop() {
delay(1);
}

Or define your own access point:

#include <WiFiNINA.h>
void setup() {
WiFi.beginAP("my-cool-AP", "verysecret");
}
void loop() {
int status = WiFi.status();
if (status == WL_AP_CONNECTED) {
// Someone connected to our Access Point! Do something...
}
delay(1);
}

Simulator examples#