Closed
Description
When no sensor is attached to the OneWire bus on calling scan() a MemoryError occurs:
Adafruit CircuitPython 2.3.1 on 2018-05-07; Adafruit CircuitPlayground Express with samd21g18
>>> import board
>>> from adafruit_onewire.bus import OneWireBus
>>> ow_bus = OneWireBus(board.D5)
>>> ow_bus.scan()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_onewire/bus.py", line 133, in scan
MemoryError: memory allocation failed, allocating 1024 bytes
I tested this on a Trinket M0, Feather M0 express and Feather M0 basic with CircuitPython 2.2.0, 2.3.1 and the 3.0 beta.
I tested the negative (with sensor attached and working) on Trinket M0 and Feather M0 basic with CircuitPython 2.3.1.
Metadata
Metadata
Assignees
Labels
No labels