Skip to content

Commit 0d2d660

Browse files
committed
Make audiocore import work on older CircuitPython
If there is no audiocore, use audioio instead.
1 parent 0b8e6b0 commit 0d2d660

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

stage.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,12 @@
11
import time
22
import array
33
import digitalio
4-
import audiocore
54
import audioio
5+
try:
6+
import audiocore
7+
except ImportError:
8+
audiocore = audioio
9+
610
import _stage
711

812

0 commit comments

Comments
 (0)