Arduino
Using the SPA06-003 breakout with Arduino involves wiring up the breakout to your Arduino-compatible microcontroller, installing the Adafruit_SPA06_003 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 sensor VIN.
Here is an Adafruit Metro wired up to the sensor 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)
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 SCK/SCL (yellow wire)
- Board SDA to breakout SDI/SDA (blue wire)
Library Installation
You can install the Adafruit_SPA06_003 library for Arduino using the Library Manager in the Arduino IDE.
Click the Manage Libraries ... menu item, search for Adafruit_SPA06_003, and select the Adafruit_SPA06_003 library:
If asked about dependencies, click "Install all".
If the "Dependencies" window does not come up, then you already have the dependencies installed.
/*!
* @file simpletest.ino
*
* A simple test for the SPA06_003 pressure and temperature sensor.
* This example shows basic pressure and temperature readings using the sensor.
*
* The begin() function automatically configures the sensor for:
* - Highest precision (128x oversampling)
* - Highest sample rate (200 Hz)
* - Continuous measurement mode
*
* Designed specifically to work with the Adafruit SPA06_003 Breakout
* ----> https://www.adafruit.com/products/xxxx
*
* These sensors use I2C to communicate, 2 pins are required to interface.
*
* Written by Limor 'ladyada' Fried with assistance from Claude Code
* for Adafruit Industries.
* MIT license, check license.txt for more information
* All text above must be included in any redistribution
*/
#include <Adafruit_SPA06_003.h>
Adafruit_SPA06_003 spa;
void setup() {
Serial.begin(115200);
while (!Serial)
delay(10); // will pause Zero, Leonardo, etc until serial console opens
Serial.println("Adafruit SPA06_003 Simple Test");
// Try to initialize!
if (!spa.begin()) {
Serial.println("Failed to find SPA06_003 chip");
while (1) {
delay(10);
}
}
Serial.println("SPA06_003 Found!");
}
void loop() {
// Only read and print when new data is available
if (spa.isTempDataReady() || spa.isPresDataReady()) {
float temperature = spa.readTemperature();
float pressure = spa.readPressure();
Serial.print("Temperature: ");
Serial.print(temperature);
Serial.print(" °C");
Serial.print("\tPressure: ");
Serial.print(pressure);
Serial.println(" hPa");
}
delay(10); // Short delay to avoid overwhelming the sensor
}
Upload the sketch to your board and open up the Serial Monitor (Tools -> Serial Monitor) at 115200 baud. You'll see the SPA06-003 recognized over I2C. Then, the temperature, and pressure will be printed out to the Serial Monitor.
Page last edited September 24, 2025
Text editor powered by tinymce.