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()