Skip to content

ValueError: Incorrect family code in device address. #14

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

Closed
robmarkcole opened this issue Dec 4, 2019 · 6 comments
Closed

ValueError: Incorrect family code in device address. #14

robmarkcole opened this issue Dec 4, 2019 · 6 comments

Comments

@robmarkcole
Copy link

robmarkcole commented Dec 4, 2019

Attempting to use the DS18X20 with Metro M4 Airlift Lite with circuitpython 5.0.0-beta.0 with the ds18x20_simpletest.py example. I hit this error, so am now setting a large _maximum_devices. However I now hit a different error - ValueError: Incorrect family code in device address.

>>> import time
>>> import board
>>> from adafruit_onewire.bus import OneWireBus
>>> from adafruit_ds18x20 import DS18X20
>>> ow_bus = OneWireBus(board.D5)
>>> ow_bus.maximum_devices(200)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: 'int' object is not callable
>>> ow_bus._maximum_devices = 200
>>> ds18 = DS18X20(ow_bus, ow_bus.scan()[0])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_onewire/bus.py", line 156, in scan
RuntimeError: Maximum device count of 200 exceeded.
>>> ow_bus._maximum_devices = 2000
>>> ds18 = DS18X20(ow_bus, ow_bus.scan()[0])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_ds18x20.py", line 56, in __init__
ValueError: Incorrect family code in device address.
@ladyada
Copy link
Member

ladyada commented Dec 4, 2019

which exact device?

@robmarkcole
Copy link
Author

18B20
image

@ladyada
Copy link
Member

ladyada commented Dec 4, 2019

please show an entire wiring diagram including pullup resistor

@robmarkcole
Copy link
Author

robmarkcole commented Dec 4, 2019

With pull up resistor no errors, all working. This is my fault for not reading the docs, so sorry! Put my writeup on https://github.com/robmarkcole/circuitpython-projects/tree/master/1-wire%20temperature

@ladyada
Copy link
Member

ladyada commented Dec 4, 2019

all good, we'll add a warning : )

@dhalbert
Copy link
Contributor

dhalbert commented Dec 4, 2019

Fixed by #15.

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

No branches or pull requests

3 participants