Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

esp8266 micropython ds18b20

from machine import Pin
import time, ds18x20
import onewire
ow = onewire.OneWire(Pin(4)) # create a OneWire bus on GPIO12
 
ds = ds18x20.DS18X20(ow)
 
roms = ds.scan()
ds.convert_temp()
time.sleep_ms(750)
 
for rom in roms:
    print(ds.read_temp(rom))
Comment

PREVIOUS NEXT
Code Example
Python :: sum of 2 numbers in python 
Python :: cmd check if python is installed 
Python :: get root path python 
Python :: python define random variables name 
Python :: python package version in cmd 
Python :: how to get month name from date in pandas 
Python :: python check if number is integer or float 
Python :: std python 
Python :: django never_cache example 
Python :: import qq plot 
Python :: how to create model in tensorflow 
Python :: how to select a file in python 
Python :: how to convert a set to a list in python 
Python :: change xlabel rotate in seaborn 
Python :: multiple pdf in a directory to csv python 
Python :: convert list of list to list python 
Python :: end python program 
Python :: isntall packages to databricks 
Python :: how to sort list of dictionaries in python 
Python :: pandas rename column values dictionary 
Python :: filter query objects by date range in Django? 
Python :: how to create a python script to automate software installation? 
Python :: python recursively print directory 
Python :: reverse range in python 
Python :: size of the query process in python BigQuery 
Python :: python3 ngrok.py 
Python :: how to unpivot dataframe pandas 
Python :: install python altair 
Python :: pygame tick time 
Python :: discord py import commands 
ADD CONTENT
Topic
Content
Source link
Name
4+5 =