Example Code for Arduino-GPIO Digital Write
Last revision 2026/01/08
This article offers a comprehensive guide on using Arduino for GPIO digital write, detailing hardware setup, wiring connection, and sample code to illuminate an LED module, specifically utilizing the Beetle RP2350 board.
Hardware Preparation
Wiring Diagram

| Mainboard | Pin name | Module | Pin name |
|---|---|---|---|
| Beetle RP2350 | GND | LED Light Module | GND |
| Beetle RP2350 | 3V3 | LED Light Module | VCC |
| Beetle RP2350 | 4 | LED Light Module | D |
Sample Code
int ledPin = 4; // Define LED pin
void setup(){
pinMode(ledPin, OUTPUT);
digitalWrite(ledPin, HIGH);
}
void loop(){
}
Result
After the program is uploaded, you can see the blue LED light up.
Was this article helpful?
