Skip to content

Commit 27603d6

Browse files
committed
update readme
1 parent 10ff756 commit 27603d6

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

README.md

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,9 @@ This is an Arduino library for the **SPA06-003** pressure and temperature sensor
2626
- Fully compatible with the Arduino Wire library.
2727
- Supports both default and alternate I2C addresses.
2828

29+
- **SPI Communication**
30+
- Fully compatible with the Arduino SPI library.
31+
2932
- **Cross-Platform Compatibility**:
3033
- Compatible with all Arduino boards and architectures.
3134

@@ -48,7 +51,7 @@ This is an Arduino library for the **SPA06-003** pressure and temperature sensor
4851

4952
## Getting Started
5053

51-
### Hardware Setup
54+
### Hardware Setup By I2C
5255
1. Connect the SPA06-003 sensor to your Arduino board via I2C:
5356
- **VCC**: 3.3V or 5V (depending on your board).
5457
- **GND**: Ground.
@@ -57,6 +60,15 @@ This is an Arduino library for the **SPA06-003** pressure and temperature sensor
5760

5861
2. Ensure the I2C address matches the sensor configuration (default: `0x77`).
5962

63+
### Hardware Setup By SPI
64+
1. Connect the SPA06-003 sensor to your Arduino board via SPI:
65+
- **VCC**: 3.3V or 5V (depending on your board).
66+
- **GND**: Ground.
67+
- **CS** : Use the SS pin defined by yourself
68+
- **SCK**: SPI clock pin.
69+
- **SDO**: SPI MISO pin.
70+
- **SDI**: SPI MOSI pin.
71+
6072
### Example Code
6173

6274
#### Basic Pressure and Temperature Reading
@@ -85,7 +97,7 @@ void setup() {
8597
Wire.begin();
8698

8799
// Connect to SPL07-003
88-
if (spl.begin(SPL07_ADDR) == false) {
100+
if (spl.begin(SPL07_ADDR,&Wire) == false) {
89101
Serial.println("Error initializing SPL07-003 :(");
90102
while (1) {}
91103
}//if
@@ -190,4 +202,4 @@ This library is maintained by [Seeed Studio](https://www.seeedstudio.com/). Spec
190202

191203
## Source Statement
192204

193-
This project is based on [SPL07-003-Arduino-Library](https://github.com/Kenneract/SPL07-003-Arduino-Library) (created by [Kenneract](https://github.com/Kenneract))
205+
This project is based on [SPL07-003-Arduino-Library](https://github.com/Kenneract/SPL07-003-Arduino-Library) (created by [Kenneract](https://github.com/Kenneract))

0 commit comments

Comments
 (0)