1- # SPDX-FileCopyrightText: Copyright (c) 2020 Kattni Rembor for Adafruit Industries
1+ # SPDX-FileCopyrightText: 2020 Kattni Rembor for Adafruit Industries
22#
33# SPDX-License-Identifier: MIT
4- # The MIT License (MIT)
5- #
6- # Copyright (c) 2020 Kattni Rembor for Adafruit Industries
7- #
8- # Permission is hereby granted, free of charge, to any person obtaining a copy
9- # of this software and associated documentation files (the "Software"), to deal
10- # in the Software without restriction, including without limitation the rights
11- # to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
12- # copies of the Software, and to permit persons to whom the Software is
13- # furnished to do so, subject to the following conditions:
14- #
15- # The above copyright notice and this permission notice shall be included in
16- # all copies or substantial portions of the Software.
17- #
18- # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
19- # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
20- # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
21- # AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
22- # LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
23- # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
24- # THE SOFTWARE.
4+
255"""
266`adafruit_clue`
277================================================================================
@@ -409,7 +389,7 @@ def shake(self, shake_threshold=30, avg_count=10, total_delay=0.1):
409389
410390 :param total_delay: The total time in seconds it takes to obtain avg_count
411391 readings from acceleration. (Default 0.1)
412- """
392+ """
413393 shake_accel = (0 , 0 , 0 )
414394 for _ in range (avg_count ):
415395 # shake_accel creates a list of tuples from acceleration data.
@@ -742,7 +722,7 @@ def _generate_sample(self, length=100):
742722 self ._sine_wave_sample = audiocore .RawSample (self ._sine_wave )
743723
744724 def play_tone (self , frequency , duration ):
745- """ Produce a tone using the speaker. Try changing frequency to change
725+ """Produce a tone using the speaker. Try changing frequency to change
746726 the pitch of the tone.
747727
748728 :param int frequency: The frequency of the tone in Hz
@@ -767,7 +747,7 @@ def play_tone(self, frequency, duration):
767747 self .stop_tone ()
768748
769749 def start_tone (self , frequency ):
770- """ Produce a tone using the speaker. Try changing frequency to change
750+ """Produce a tone using the speaker. Try changing frequency to change
771751 the pitch of the tone.
772752
773753 :param int frequency: The frequency of the tone in Hz
@@ -802,7 +782,7 @@ def start_tone(self, frequency):
802782 self ._sample .play (self ._sine_wave_sample , loop = True )
803783
804784 def stop_tone (self ):
805- """ Use with start_tone to stop the tone produced.
785+ """Use with start_tone to stop the tone produced.
806786
807787 .. image :: ../docs/_static/speaker.jpg
808788 :alt: Speaker
0 commit comments