DS1820 SENSOR - chowette/Lua-RTOS-ESP32 GitHub Wiki
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
