Having trouble working with 1-wire device(DS1990A)

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
rpi_nerd
Posts: 24
Joined: Sat Jul 29, 2017 2:05 pm

Having trouble working with 1-wire device(DS1990A)

Post by rpi_nerd » Fri Sep 11, 2020 2:30 pm

I've been playing around this morning with 1-wire I-button device (DS1990A). I've been able to detect it with scan() but I haven't managed to read its serial number. I just getting all ones. I'm probably doing something incredibly stupid. I've tried various combos such as inserting ow.reset() with and without the select_rom, I just get the same result.

https://datasheets.maximintegrated.com/ ... S1990A.pdf

Code: Select all

import machine
import onewire
ow=onewire.OneWire(machine.Pin(2))
roms=ow.scan()
ow.reset()
ow.select_rom(roms[0])
ow.writebyte(51)
ow.readbyte()
ow.readbyte()
ow.readbyte()
ow.readbyte()
ow.readbyte()
ow.readbyte()
ow.readbyte()
ow.readbyte()

Post Reply