We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 58c8cb6 + 493ee62 commit 0503f11Copy full SHA for 0503f11
examples/ble_adafruit_clue.py
@@ -114,9 +114,12 @@
114
clue._mic.record( # pylint: disable=protected-access
115
mic_samples, len(mic_samples)
116
)
117
+ # Need to create an array of the correct type, because ulab
118
+ # seems to get broadcasting of builtin Python types wrong.
119
+ offset = np.array([32768], dtype=np.uint16)
120
# This subtraction yields unsigned values which are
121
# reinterpreted as signed after passing.
- mic_svc.sound_samples = mic_samples - 32768
122
+ mic_svc.sound_samples = mic_samples - offset
123
mic_last_update = now_msecs
124
125
neopixel_values = neopixel_svc.values
0 commit comments