Skip to content

CPB temperature ZeroDivisionError #127

@snkYmkrct

Description

@snkYmkrct

When trying to run the circuitplayground_temperature.py example code on Circuit Playground Bluefruit, with the latest CircuitPython image, it crashes with ZeroDivisionError since the reading from the thermistor seems to be 0.

🐍BLE:Off | code.py | 9.0.2\Traceback (most recent call last):
  File "code.py", line 11, in <module>
  File "adafruit_circuitplayground/circuit_playground_base.py", line 650, in temperature
  File "adafruit_thermistor.py", line 126, in temperature
  File "adafruit_thermistor.py", line 116, in resistance
ZeroDivisionError: division by zero
]0;🐍BLE:Off | 116@adafruit_thermistor.py ZeroDivisionError | 9.0.2\
Code done running.

This bug was reported in Discord by a new user, and the light sensor only returns 0 as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions