From 8ed3a9eb9c02149ace9616813306fd3940ae032c Mon Sep 17 00:00:00 2001 From: Damien George Date: Wed, 27 Apr 2016 22:32:39 +0100 Subject: [PATCH] esp8266/tests/onewire.py: Don't run test on import. --- esp8266/tests/onewire.py | 10 +++------- 1 file 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()