Arduino
Using the GP8403 breakout with Arduino involves wiring up the breakout to your Arduino-compatible microcontroller, installing the Adafruit_GP8403 library, and running the provided example code.
Wiring
Wire as shown for a 5V board like an Uno. If you are using a 3V board, like an Adafruit Feather, wire the board's 3V pin to the breakout VIN.
Here is an Adafruit Metro wired up to the breakout using the STEMMA QT connector:
-
Board 5V to breakout VIN (red wire)
-
Board GND to breakout GND (black wire)
-
Board SCL to breakout SCL (yellow wire)
- Board SDA to breakout SDA (blue wire)
The signal will be output from the DAC V0 terminal block with GND.
Here is an Adafruit Metro wired up using a solderless breadboard:
-
Board 5V to breakout VIN (red wire)
-
Board GND to breakout GND (black wire)
-
Board SCL to breakout SCL (yellow wire)
- Board SDA to breakout SDA (blue wire)
The signal will be output from the DAC OUT0 pin and GND.
Library Installation
You can install the Adafruit_GP8403 library for Arduino using the Library Manager in the Arduino IDE.
Click the Manage Libraries ... menu item, search for Adafruit_GP8403, and select the Adafruit GP8403 library:
If asked about dependencies, click "Install all".
If the "Dependencies" window does not come up, then you already have the dependencies installed.
/*
* Adafruit GP8403 Dual Output 5 V Example
*
* Selects the 0-5 V range and sets both output channels.
*/
#include <Adafruit_GP8403.h>
Adafruit_GP8403 gp8403;
void setup() {
Serial.begin(115200);
while (!Serial) {
delay(10);
}
Serial.println("Adafruit GP8403 Dual Output 5 V Example");
if (!gp8403.begin()) {
Serial.println("Could not find GP8403");
while (1) {
delay(10);
}
}
if (!gp8403.setOutputRange(GP8403_RANGE_5V)) {
Serial.println("Could not select the 5 V output range");
while (1) {
delay(10);
}
}
if (!gp8403.setVoltages(1.25, 3.75)) {
Serial.println("Could not set both output voltages");
while (1) {
delay(10);
}
}
// getVoltage() returns cached values, not hardware readback.
Serial.print("Channel 0: ");
Serial.print(gp8403.getVoltage(0), 2);
Serial.println(" V");
Serial.print("Channel 1: ");
Serial.print(gp8403.getVoltage(1), 2);
Serial.println(" V");
}
void loop() { delay(1000); }
Upload the sketch to your board and open up the Serial Monitor (Tools -> Serial Monitor) at 115200 baud. You'll see the GP8403 recognized over I2C.
Page last edited August 27, 2026
Text editor powered by tinymce.