onewire DS18B20 issue
Posted: Wed May 04, 2016 7:38 pm
I am trying to get the temperature sensor example from the tutorial to work and it seems there is a flaw with the pin attributes:
[code]
>>> import time, machine, onewire
>>> dat = machine.Pin(12)
>>> ds = onewire.DS18B20(onewire.OneWire(dat))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "onewire", line 16, in __init__
AttributeError: 'Pin' object has no attribute 'PULL_NONE'
>>> import port_diag
Flash ID: 1640e0 (Vendor: e0 Device: 4016)
Flash bootloader data:
Byte @2: 00
Byte @3: 40 (Flash size: 4MB Flash freq: 40MHZ)
[/code]
P.S.: I also seem to be unable to activate BBCode here in this forum.
[code]
>>> import time, machine, onewire
>>> dat = machine.Pin(12)
>>> ds = onewire.DS18B20(onewire.OneWire(dat))
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "onewire", line 16, in __init__
AttributeError: 'Pin' object has no attribute 'PULL_NONE'
>>> import port_diag
Flash ID: 1640e0 (Vendor: e0 Device: 4016)
Flash bootloader data:
Byte @2: 00
Byte @3: 40 (Flash size: 4MB Flash freq: 40MHZ)
[/code]
P.S.: I also seem to be unable to activate BBCode here in this forum.