Skip to content

DS1820 SENSOR

Thomas E. Horner edited this page Mar 12, 2019 · 10 revisions

Specification

What Comments
Identifier DS1820
Interface 1-WIRE
Provides temperature celsius degrees
Properties resolution bits of resolution
rom address in the bus
type model
numdev number of DS180 sensors in the bus
Datasheet

Code

-- Attach the second DS1820 sensor connected to GPIO26
s = sensor.attach("DS1820", pio.GPIO26, 2)

while true do
  print("temp: "..s:read("temperature"))
  tmr.delayms(500)
end

Back to sensor list

Clone this wiki locally