Skip to content

Commit 69eda85

Browse files
authored
Merge pull request #1051 from kattni/zelda-sword-update
Update for CircuitPython 5.0.0
2 parents b3598d9 + 7b83d4c commit 69eda85

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Propmaker_Master_Sword/code.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
Please support Adafruit and open source hardware by purchasing
55
products from Adafruit!
66
Written by Kattni Rembor & Limor Fried for Adafruit Industries
7-
Copyright (c) 2019 Adafruit Industries
7+
Copyright (c) 2019-2020 Adafruit Industries
88
Licensed under the MIT license.
99
All text above must be included in any redistribution.
1010
"""
@@ -13,7 +13,7 @@
1313
import random
1414
import digitalio
1515
import audioio
16-
import busio
16+
import audiocore
1717
import board
1818
import neopixel
1919
import adafruit_lis3dh
@@ -53,7 +53,7 @@
5353
wave_file = None
5454

5555
# Set up accelerometer on I2C bus, 4G range:
56-
i2c = busio.I2C(board.SCL, board.SDA)
56+
i2c = board.I2C()
5757
accel = adafruit_lis3dh.LIS3DH_I2C(i2c)
5858
accel.range = adafruit_lis3dh.RANGE_4_G
5959

@@ -76,7 +76,7 @@ def play_wav(name, loop=False):
7676
wave_file.close()
7777
try:
7878
wave_file = open('sounds/' + name + '.wav', 'rb')
79-
wave = audioio.WaveFile(wave_file)
79+
wave = audiocore.WaveFile(wave_file)
8080
audio.play(wave, loop=loop)
8181
except OSError:
8282
pass # we'll just skip playing then

0 commit comments

Comments
 (0)