diff options
author | Damien George <damien.p.george@gmail.com> | 2016-04-27 22:32:39 +0100 |
---|---|---|
committer | Damien George <damien.p.george@gmail.com> | 2016-04-27 22:32:39 +0100 |
commit | 8ed3a9eb9c02149ace9616813306fd3940ae032c (patch) | |
tree | 7f8ecb168c1650f67da23fdf3c09cc35518e8d01 | |
parent | 6d8156ae28e00017fe4fa54f35d3818d5ab8b223 (diff) | |
download | micropython-8ed3a9eb9c02149ace9616813306fd3940ae032c.tar.gz micropython-8ed3a9eb9c02149ace9616813306fd3940ae032c.zip |
esp8266/tests/onewire.py: Don't run test on import.
-rw-r--r-- | esp8266/tests/onewire.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/esp8266/tests/onewire.py b/esp8266/tests/onewire.py index 15fec1e55c..95d16c6689 100644 --- a/esp8266/tests/onewire.py +++ b/esp8266/tests/onewire.py @@ -1,5 +1,3 @@ -import time -import pyb import _onewire as _ow class OneWire: @@ -127,7 +125,9 @@ class DS18B20: # connect 1-wire temp sensors to GPIO12 for this test def test(): - dat = pyb.Pin(12) + import time + import machine + dat = machine.Pin(12) ow = OneWire(dat) ds = DS18B20(ow) @@ -141,7 +141,3 @@ def test(): for rom in roms: print(ds.get_temp(rom), end=' ') print() - -#pyb.freq(80000000) -#pyb.freq(160000000) -test() |