Skip to content

Update simpleio.tone to match 3.x audioio api #36

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Oct 2, 2018

Conversation

caternuson
Copy link

Fix for #35 . Firmware version used included DAC updates from here. Also added check for sample rate to not exceed DAC max.

BEFORE

Adafruit CircuitPython 3.0.2-2-gaf7a0ee on 2018-09-19; Adafruit CircuitPlayground Express with samd21g18
>>> import board, simpleio
>>> spk = simpleio.DigitalOut(board.SPEAKER_ENABLE)
>>> spk.value = True
>>> simpleio.tone(board.A0, 440, 0.5)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "simpleio.py", line 55, in tone
TypeError: extra positional arguments given
>>> 

AFTER

Adafruit CircuitPython 3.0.2-2-gaf7a0ee on 2018-09-19; Adafruit CircuitPlayground Express with samd21g18
>>> import board, simpleio
>>> spk = simpleio.DigitalOut(board.SPEAKER_ENABLE)
>>> spk.value = True
>>> simpleio.tone(board.A0, 440, 0.5)
>>> 

Copy link
Contributor

@kattni kattni left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested successfully as well! Thank you so much for doing this!

@kattni kattni merged commit 1420b3f into adafruit:master Oct 2, 2018
tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Oct 3, 2018
Updating https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground to 2.0.3 from 2.0.2:
  > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#41 from caternuson/iss40
  > ignore the board module imports in .pylintrc
  > Merge pull request adafruit/Adafruit_CircuitPython_CircuitPlayground#38 from kattni/pylint-fix
  > updated CoC

Updating https://github.com/adafruit/Adafruit_CircuitPython_HCSR04 to 0.3.3 from 0.3.2:
  > Try a new encrypted password

Updating https://github.com/adafruit/Adafruit_CircuitPython_LIDARLite to 1.1.0 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_LIDARLite#2 from kattni/pypi-setup

Updating https://github.com/adafruit/Adafruit_CircuitPython_MLX90614 to 1.1.0 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_MLX90614#9 from kattni/pypi-setup
  > ignore the board module imports in .pylintrc
  > updated CoC

Updating https://github.com/adafruit/Adafruit_CircuitPython_TCA9548A to 0.1.1 from 0.0.1:
  > Merge pull request adafruit/Adafruit_CircuitPython_TCA9548A#3 from kattni/pypi-setup

Updating https://github.com/adafruit/Adafruit_CircuitPython_miniQR to 1.1.0 from 1.0.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_miniQR#3 from kattni/pypi-setup

Updating https://github.com/adafruit/Adafruit_CircuitPython_SimpleIO to 1.1.1 from 1.1.0:
  > Merge pull request adafruit/Adafruit_CircuitPython_SimpleIO#36 from caternuson/iss35
  > Merge pull request adafruit/Adafruit_CircuitPython_SimpleIO#34 from brentru/remove-servo
  > Merge pull request adafruit/Adafruit_CircuitPython_SimpleIO#32 from ScottDWebster/master
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants