summaryrefslogtreecommitdiffstatshomepage
path: root/drivers/onewire/ds18x20.py
diff options
context:
space:
mode:
authorPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-04-23 11:35:34 +0300
committerPaul Sokolovsky <pfalcon@users.sourceforge.net>2017-05-21 17:44:58 +0300
commit1c9ee497562ab49c00d190ff91b6689979f922f4 (patch)
tree241a0dcc471b70f142ad637b35b6b4a69ee2452f /drivers/onewire/ds18x20.py
parentbcf31a39087bd7727e15105363063980120fd528 (diff)
downloadmicropython-1c9ee497562ab49c00d190ff91b6689979f922f4.tar.gz
micropython-1c9ee497562ab49c00d190ff91b6689979f922f4.zip
drivers: Replace deprecated Pin.high()/low() methods with .__call__(1/0).
Diffstat (limited to 'drivers/onewire/ds18x20.py')
-rw-r--r--drivers/onewire/ds18x20.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/onewire/ds18x20.py b/drivers/onewire/ds18x20.py
index 342f4b28ae..72adcbfd46 100644
--- a/drivers/onewire/ds18x20.py
+++ b/drivers/onewire/ds18x20.py
@@ -7,11 +7,11 @@ temperature sensors. It supports multiple devices on the same 1-wire bus.
The following example assumes the ground of your DS18x20 is connected to
Y11, vcc is connected to Y9 and the data pin is connected to Y10.
->>> from pyb import Pin
+>>> from machine import Pin
>>> gnd = Pin('Y11', Pin.OUT_PP)
->>> gnd.low()
+>>> gnd.off()
>>> vcc = Pin('Y9', Pin.OUT_PP)
->>> vcc.high()
+>>> vcc.on()
>>> from ds18x20 import DS18X20
>>> d = DS18X20(Pin('Y10'))