diff --git a/lua_modules/dht_lib/dht_lib.lua b/lua_modules/dht_lib/dht_lib.lua index 97823455..ab33c33e 100644 --- a/lua_modules/dht_lib/dht_lib.lua +++ b/lua_modules/dht_lib/dht_lib.lua @@ -103,7 +103,7 @@ function M.read(pin) for i = 1, 8, 1 do -- Byte[3] if (bitStream[i+24] > 3) then - byte_2 = byte_2 + 2 ^ (8 - i) + byte_3 = byte_2 + 2 ^ (8 - i) end end