feathers2 pin number confusion

CircuitPython on hardware including Adafruit's boards, and CircuitPython libraries using Blinka on host computers.

Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.
Locked
User avatar
jfranklyn
 
Posts: 46
Joined: Fri Mar 13, 2020 6:50 pm

feathers2 pin number confusion

Post by jfranklyn »

Hello,
I'm trying to use a feathers2 with a DS18B20 sensor. I'm using the code from ds18x20_simpletest.py
This line of code keeps failing with number of devices exceeded:
ds18 = DS18X20(ow_bus, ow_bus.scan()[0])

I have a print-out of the feathers2 board. I "think" I have the data (yellow) wire plugged into pin D19. I don't know if this is D19, D10 or D5. The pin number on the board is 5. I'm running the latest firmware on the feathers2: adafruit-circuitpython-unexpectedmaker_feathers2-en_US-6.2.0
I've included a screen capture of the board wiring.

Any help would be greatly appreciated.
Thanks
Attachments
20210511_112207.jpg
20210511_112207.jpg (726.91 KiB) Viewed 143 times

User avatar
jfranklyn
 
Posts: 46
Joined: Fri Mar 13, 2020 6:50 pm

Re: feathers2 pin number confusion

Post by jfranklyn »

Follow up on this problem. This code is from: ds18x20_asynctest.py
import board
from adafruit_onewire.bus import OneWireBus
from adafruit_ds18x20 import DS18X20
ow_bus = OneWireBus(board.D19)

ow_bus.scan()
[]

Based on the result above, I expect this next code to fail with index out of range. I think this tells me that I have the correct pin number (D19), BUT something else is wrong.
ds18 = DS18X20(ow_bus, ow_bus.scan()[0])
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
IndexError: list index out of range

User avatar
kevinjwalters
 
Posts: 1025
Joined: Sun Oct 01, 2017 3:15 pm

Re: feathers2 pin number confusion

Post by kevinjwalters »

Looks like D19 according to pinout on https://unexpectedmaker.com/shop/feathers2-esp32-s2

The solder joint on GND looks a bit iffy, might be worth resoldering in case you have a high resistance dry-joint there.

Locked
Please be positive and constructive with your questions and comments.

Return to “Adafruit CircuitPython”