-
Notifications
You must be signed in to change notification settings - Fork 1.3k
OneWire not working in CP 3.0.0 rc0 #964
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
Comments
I think it is beyond
The 3.x change in I'm going to dip into the ASF4/datasheet to see if any documentation supports this. NOTE: while i'm on a dirty, oldish 3.x, I verified it includes the same digitalio code as RC0. also, for whatever reason, my tags never update anyway. this is post 3.alpha-6 firmware. 🤷♂️ |
The DRVSTR bit setting thing was added about eight months ago, but the code was wrong for PBxx pins initially. It worked OK for PAxx pins. That was fixed 2 months ago. btw if you want to update your tags, you can do |
@sommersoft How did you decide to do shared-module/bitbangio/OneWire.c` does this:
which is more like
|
My initial test with The no arg I was really just trying to force the behavior of switching between modes, and being able to capture it with the Saleae. |
Yep! That was my bad. Using |
I spent time on this and have OneWire working, if a bit erratically, with a DS18B20 temp sensor. Two issues:
Given the strict timing, perhaps using pulseio would be better, if possible. |
Thanks everyone! |
Yep. Looks good: Adafruit CircuitPython 3.0.0-rc.0-13-gf1248dc on 2018-06-29; Adafruit ItsyBitsy M0 Express with samd21g18
>>> import board, busio
>>> ow = busio.OneWire(board.D7)
>>> ow.write_bit(1) DS18B20 checks out: Adafruit CircuitPython 3.0.0-rc.0-13-gf1248dc on 2018-06-29; Adafruit ItsyBitsy M0 Express with samd21g18
>>> import board
>>> from adafruit_onewire.bus import OneWireBus
>>> import adafruit_ds18x20
>>> ow_bus = OneWireBus(board.D7)
>>> devices = ow_bus.scan()
>>> ds18b20 = adafruit_ds18x20.DS18X20(ow_bus, devices[0])
>>> ds18b20.temperature
24.5 DS2413 checks out: Adafruit CircuitPython 3.0.0-rc.0-13-gf1248dc on 2018-06-29; Adafruit ItsyBitsy M0 Express with samd21g18
>>> import board
>>> from adafruit_onewire.bus import OneWireBus
>>> import adafruit_ds2413
>>> ow_bus = OneWireBus(board.D7)
>>> ds = adafruit_ds2413.DS2413(ow_bus, ow_bus.scan()[0])
>>> ds.IOA.direction = adafruit_ds2413.INPUT
>>> ds.IOA.value
True
>>> ds.IOA.value
False |
REF: https://forums.adafruit.com/viewtopic.php?f=60&t=137405
D5 is a special pin on the Itsy, but even using D7 for testing indicates something is not working:
CP 2.3.1
CP 3.0.0 rc0
The text was updated successfully, but these errors were encountered: