I have a DS18B20 digital thermometer connected via a Silicon Labs CP210x USB-to-UART Bridge to my laptop (which is running Debian testing), and I can access the bridge (from debian linux) via the usual device file /dev/ttyUSB0.
I would like to try out micropython for the first time, and I've successfully installed the unix port of micropython (version 1.14) on my debian amd64 laptop using snapcraft.io.
I've found the micropython tutorial's "Controlling 1-wire devices" page which contains the following code:
Code: Select all
# the device is on GPIO12
dat = machine.Pin(12)
# create the onewire object
ds = ds18x20.DS18X20(onewire.OneWire(dat))
Is this possible? TIA, J