From 0d2d660e886de8a1b96778c865c7fa48df5f4ea6 Mon Sep 17 00:00:00 2001 From: Radomir Dopieralski Date: Tue, 30 Jul 2019 23:32:13 +0200 Subject: [PATCH] Make audiocore import work on older CircuitPython If there is no audiocore, use audioio instead. --- stage.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stage.py b/stage.py index 170118a..442d45d 100644 --- a/stage.py +++ b/stage.py @@ -1,8 +1,12 @@ import time import array import digitalio -import audiocore import audioio +try: + import audiocore +except ImportError: + audiocore = audioio + import _stage