File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 4
4
Please support Adafruit and open source hardware by purchasing
5
5
products from Adafruit!
6
6
Written by Kattni Rembor & Limor Fried for Adafruit Industries
7
- Copyright (c) 2019 Adafruit Industries
7
+ Copyright (c) 2019-2020 Adafruit Industries
8
8
Licensed under the MIT license.
9
9
All text above must be included in any redistribution.
10
10
"""
13
13
import random
14
14
import digitalio
15
15
import audioio
16
- import busio
16
+ import audiocore
17
17
import board
18
18
import neopixel
19
19
import adafruit_lis3dh
53
53
wave_file = None
54
54
55
55
# Set up accelerometer on I2C bus, 4G range:
56
- i2c = busio .I2C (board . SCL , board . SDA )
56
+ i2c = board .I2C ()
57
57
accel = adafruit_lis3dh .LIS3DH_I2C (i2c )
58
58
accel .range = adafruit_lis3dh .RANGE_4_G
59
59
@@ -76,7 +76,7 @@ def play_wav(name, loop=False):
76
76
wave_file .close ()
77
77
try :
78
78
wave_file = open ('sounds/' + name + '.wav' , 'rb' )
79
- wave = audioio .WaveFile (wave_file )
79
+ wave = audiocore .WaveFile (wave_file )
80
80
audio .play (wave , loop = loop )
81
81
except OSError :
82
82
pass # we'll just skip playing then
You can’t perform that action at this time.
0 commit comments