Arduino Uno R4 WiFi pinout: every pin, and how it differs from an R3
Beginner
Or see every lesson.
- 455parts on the bench
- 43boards running now
- 1.00xreal time, on every board
The Arduino Uno R4 WiFi keeps the Uno’s outline and headers, so an Uno shield fits, but the chip behind them is a Renesas RA4M1, an Arm Cortex-M4 at 48 MHz, with an ESP32-S3 beside it for WiFi and a 12 by 8 LED matrix on top. This page lists every header pin, what it can do, the power pins and the limits, and the places where an R4 behaves differently from an Uno R3 with the same wiring.
The circuit above is the board in Mokxi drawing a beating heart on its matrix, with the L LED on pin 13 flashing in time. The table is read from the same board model the simulator runs, and where the simulator does less than the board, the page says so.
Every pin on the header
The top header reads, left to right, SCL, SDA, AREF, GND, then 13 down to 0. The bottom header reads IOREF, RESET, 3V3, 5V, GND, GND, VIN, then A0 to A5. That is an Uno R3’s header hole for hole. SDA and SCL by AREF are the same two traces as A4 and A5: one signal, two holes.
In code the digital pins are their numbers and the analog pins are A0 to A5, which are also digital pins 14 to 19.
| Pin | In code | What it can do | Watch out for |
|---|---|---|---|
| SCL | A5 | I2C SCL: the same trace as A5. | Used by any I2C device. |
| SDA | A4 | I2C SDA: the same trace as A4. | Used by any I2C device. |
| AREF | - | The analog reference input. | Not a GPIO. Mokxi reads it and ignores it. |
| GND | - | Ground. Three holes. | - |
| 13 | 13 | Digital. SPI SCK. The L LED, lit when HIGH. | - |
| 12 | 12 | Digital. SPI MISO. | - |
| 11 | 11 | PWM. SPI MOSI. | - |
| 10 | 10 | PWM. SPI SS. | - |
| 9 | 9 | PWM. | - |
| 8 | 8 | Digital. | - |
| 7 | 7 | Digital. | - |
| 6 | 6 | PWM. | - |
| 5 | 5 | PWM. | - |
| 4 | 4 | Digital. | - |
| 3 | 3 | PWM. An interrupt pin on a real board. | No attachInterrupt in Mokxi: poll it. |
| 2 | 2 | Digital. An interrupt pin on a real board. | No attachInterrupt in Mokxi: poll it. |
| 1 | 1 | Serial1 TX. Not the USB port. | Serial is the USB socket on an R4. |
| 0 | 0 | Serial1 RX. Not the USB port. | Serial is the USB socket on an R4. |
| IOREF | - | Tells a shield the board’s logic level: 5 V. | Not a GPIO. |
| RESET | - | Reset: low restarts the board. | Not a GPIO. |
| 3V3 | - | A small 3.3 V output. | Not for a motor or a servo. |
| 5V | - | 5 V out, from USB or the regulator. | Not a GPIO. |
| VIN | - | Power in, 6 to 24 V. | Mokxi ignores it; the board is on USB. |
| A0 | 14 | Analog. A 12-bit DAC output on a real board (not modeled). | - |
| A1 | 15 | Analog. | - |
| A2 | 16 | Analog. | - |
| A3 | 17 | Analog. | - |
| A4 | 18 | Analog. I2C SDA. | Used by any I2C device. |
| A5 | 19 | Analog. I2C SCL. | Used by any I2C device. |
Power pins, and the 8 mA limit
VIN takes 6 to 24 V, a wider range than an Uno R3’s, and the board makes its own 5 V from it. 5V is the regulated rail, from USB or from VIN. 3V3 is a small output for a sensor. IOREF is 5 V and tells a shield which logic level the board uses. The three GND holes are one ground.
The pins are 5 V, like an R3’s, but Arduino rates each one for only 8 mA where an R3’s gives 20. An LED on a 1 k resistor is fine; an LED on 220 ohms, a relay coil or a buzzer hung straight off a pin is asking too much. Use a transistor or a driver module for anything that needs current. Mokxi does not model a pin’s current limit, so it will not stop you; the board will.
Serial and Serial1 are different ports
On an Uno R3, Serial is pins 0 and 1, passed through a second chip to USB. On an R4 the USB is on the main chip itself: Serial is the USB socket and reaches no header pin, and Serial1 is the UART on pins 0 and 1, a port of its own. A sketch that talks to a GPS module on pins 0 and 1 with Serial needs Serial1 on an R4.
In Mokxi both print to the serial monitor, and Serial1 also comes out of pin 1 as bits, so a second board or the logic analyzer wired to it sees the bytes.
Analog in, PWM, I2C and SPI
The converter is fourteen bits, but analogRead returns ten, 0 to 1023, so an Uno sketch’s thresholds still mean the same thing. analogReadResolution(14) gives all fourteen. Full scale is the 5 V rail. On a real board A0 is also a 12-bit DAC output; Mokxi does not model the DAC.
PWM is on the same six pins as an Uno, 3, 5, 6, 9, 10 and 11, at 490 Hz in Mokxi. I2C is A4 and A5, also reachable as SDA and SCL by AREF, and SPI is 10 to 13. In Mokxi both buses run in software on those pins, because the chip’s I2C and SPI blocks are not modeled. The Qwiic socket on a real board is a second I2C bus, which Mokxi draws and does not model.
What else is different from an Uno R3
There is no internal pull-down on this chip: INPUT_PULLUP works and INPUT_PULLDOWN gives a plain floating input. The LED matrix sits on eleven pins of the RA4M1 that reach no header hole, so it costs you none of the twenty. And the WiFi chip, the ESP32-S3, talks to the RA4M1 over its own serial link; in Mokxi it is not a part, and WiFiS3.h reaches Mokxi’s simulated network directly, with no radio behind it, and real internet when you sign in and switch it on.
Mokxi has no attachInterrupt on the R4, because the chip’s interrupt controller is not modeled, so a sketch polls its buttons. A compiled Uno R3 program will not run on the R4; the same source, built for the R4, will.
Questions
Which Uno R4 WiFi pin should I use for a button?
Pin 2, with `INPUT_PULLUP` and the button to ground, as on an Uno. Any digital pin works. There is no internal pull-down, so wire the button to ground, not to 5 V.
Which pins are PWM on the Uno R4 WiFi?
3, 5, 6, 9, 10 and 11, the six with a tilde, the same six as an Uno R3.
Is the Uno R4 WiFi pinout the same as the Uno R3?
The holes are, so a shield fits. What changes is behind them: 8 mA per pin instead of 20, Serial on USB and Serial1 on 0 and 1, a 14-bit converter, a DAC on A0 and VIN up to 24 V.
What are the Uno R4 WiFi I2C pins?
A4 is SDA and A5 is SCL, also brought out as SDA and SCL beside AREF. The Qwiic socket is a separate, second bus on a real board.
Which Uno R4 WiFi pin should I use for a servo?
Pin 9, as on an Uno. `Servo.h` works on any digital pin. The signal wire takes almost no current, so the 8 mA limit is not a problem, but power the servo itself from 5V or its own supply, never from a pin.
Can I drive a relay straight from an Uno R4 WiFi pin?
Not a bare relay coil: it wants far more than 8 mA. A relay module with its own transistor, driven from a pin, is fine.
Keep going
Where the facts on this page come from
Build this for real
Open the editor, change a value and watch the number move with it. Nothing to install, and no account needed.