Skip to content

Commit e70a6e7

Browse files
committed
feat: examples added
1 parent 51cd3e6 commit e70a6e7

File tree

3 files changed

+71
-0
lines changed

3 files changed

+71
-0
lines changed

examples/config_all/config_all.ino

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#include <Wire.h>
2+
#include <PI3EQX12908A2.h>
3+
4+
PI3EQX12908 RD;
5+
6+
void setup() {
7+
Wire.begin();
8+
Serial.begin(115200);
9+
10+
delay(1000);
11+
Serial.println("\n\r -------- CONFIGURATION --------");
12+
RD.init(0x70); // Setting the I2C address
13+
RD.setEQ(0); // Setting EQ for all channels
14+
RD.setFG(FLAT_GAIN_00db); // Setting flat gain for all channels
15+
RD.setSW(SWING_900mVpp); // Setting swing for all channels
16+
RD.setSDTConfig(SDT_OFF_30_ON_130_mVpp); // Setting signal detect threshold
17+
RD.print_all(); // Print all of the registers
18+
}
19+
20+
void loop() {
21+
22+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
#include <Wire.h>
2+
#include <PI3EQX12908A2.h>
3+
4+
PI3EQX12908 RD;
5+
6+
void setup() {
7+
Wire.begin();
8+
Serial.begin(115200);
9+
10+
delay(1000);
11+
Serial.println("\n\r -------- CONFIGURATION --------");
12+
RD.init(0x70); // Setting the I2C address
13+
RD.setEQ_A(0); // Setting EQ for channel A
14+
RD.setFG_A(FLAT_GAIN_00db); // Setting flat gain for channel A
15+
RD.setSW_A(SWING_900mVpp); // Setting swing for channel A
16+
RD.setSDTConfig(SDT_OFF_30_ON_130_mVpp); // Setting signal detect threshold
17+
RD.setPowerDown_B(CFG_OFF); // Turn channel B off
18+
RD.print_all(); // Print all of the registers
19+
}
20+
21+
void loop() {
22+
23+
}
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
#include <Wire.h>
2+
#include <PI3EQX12908A2.h>
3+
4+
PI3EQX12908 RD;
5+
6+
void setup() {
7+
Wire.begin();
8+
Serial.begin(115200);
9+
10+
delay(1000);
11+
Serial.println("\n\r -------- CONFIGURATION --------");
12+
RD.init(0x70); // Setting the I2C address
13+
RD.setEQ_A0(0); // Setting EQ for channel A0
14+
RD.setEQ_A1(2); // Setting EQ for channel A1
15+
RD.setEQ_A2(1); // Setting EQ for channel A2
16+
RD.setPowerDown_A(3, CFG_OFF); // Turn channel A3 off
17+
RD.setFG_A(FLAT_GAIN_00db); // Setting flat gain for channel A
18+
RD.setSW_A(SWING_900mVpp); // Setting swing for channel A
19+
RD.setSDTConfig(SDT_OFF_30_ON_130_mVpp); // Setting signal detect threshold
20+
RD.setPowerDown_B(CFG_OFF); // Turn channel B off
21+
RD.print_all(); // Print all of the registers
22+
}
23+
24+
void loop() {
25+
26+
}

0 commit comments

Comments
 (0)