File tree 3 files changed +24
-0
lines changed
3 files changed +24
-0
lines changed Original file line number Diff line number Diff line change @@ -94,9 +94,17 @@ Usage Example
94
94
import audiobusio
95
95
import audiocore
96
96
import board
97
+ import digitalio
97
98
98
99
import adafruit_tlv320
99
100
101
+ # Reset the DAC before use
102
+ reset_pin = digitalio.DigitalInOut(board.D12)
103
+ reset_pin.direction = digitalio.Direction.OUTPUT
104
+ reset_pin.value = False # Set low to reset
105
+ time.sleep(0.1 ) # Pause 100ms
106
+ reset_pin.value = True # Set high to release from reset
107
+
100
108
i2c = board.I2C()
101
109
dac = adafruit_tlv320.TLV320DAC3100(i2c)
102
110
Original file line number Diff line number Diff line change 13
13
import time
14
14
15
15
import board
16
+ import digitalio
16
17
17
18
from adafruit_tlv320 import (
18
19
DAC_PATH_MIXED ,
41
42
VOL_RIGHT_TO_LEFT ,
42
43
)
43
44
45
+ # Reset the DAC before use
46
+ reset_pin = digitalio .DigitalInOut (board .D12 )
47
+ reset_pin .direction = digitalio .Direction .OUTPUT
48
+ reset_pin .value = False # Set low to reset
49
+ time .sleep (0.1 ) # Pause 100ms
50
+ reset_pin .value = True # Set high to release from reset
51
+
44
52
print ("Initializing I2C and TLV320DAC3100..." )
45
53
i2c = board .I2C ()
46
54
dac = TLV320DAC3100 (i2c )
Original file line number Diff line number Diff line change 9
9
import audiobusio
10
10
import audiocore
11
11
import board
12
+ import digitalio
12
13
13
14
import adafruit_tlv320
14
15
16
+ # Reset the DAC before use
17
+ reset_pin = digitalio .DigitalInOut (board .D12 )
18
+ reset_pin .direction = digitalio .Direction .OUTPUT
19
+ reset_pin .value = False # Set low to reset
20
+ time .sleep (0.1 ) # Pause 100ms
21
+ reset_pin .value = True # Set high to release from reset
22
+
15
23
i2c = board .I2C ()
16
24
dac = adafruit_tlv320 .TLV320DAC3100 (i2c )
17
25
You can’t perform that action at this time.
0 commit comments