--tag start
function readthetag()
addr = ow.reset_search(TAGONETAG)
repeat
tmr.wdclr()
if (addr ~= nil) then
crc = ow.crc8(string.sub(addr,1,7))
mytagnumber = addr
--mytagnumber=string.format("%02X%02X%02X%02X%02X%02X",
-- addr:byte(7),addr:byte(6),
-- addr:byte(5),addr:byte(4),
-- addr:byte(3),addr:byte(2))
--crc)
--for i = 1,string.len(addr),1 do
-- mytagnumber = mytagnumber..string.format("%02X",addr:byte(i))
--end
--mytagnumber = encoder.toHex(addr)
--mytagnumber=string.format("%02X",addr)
--mytagnumber = tonumber(data, 16)
end
addr = ow.search(TAGONETAG)
until(addr == nil)
end