1
0
mirror of https://github.com/osmarks/random-stuff synced 2024-12-28 02:50:33 +00:00
random-stuff/computercraft/radiationmeter.lua

11 lines
375 B
Lua
Raw Normal View History

2024-03-29 14:35:43 +00:00
local modem = {peripheral.find("modem", function(_, o) return o.isWireless() end)}
local function send(...)
for _, modem in pairs(modem) do
modem.transmit(48869, 48869, {...})
end
end
local sensor = peripheral.find "environmentDetector"
while true do
send("mek_radiation_sv_h", "Mekanism radiation level (Sv/h)", sensor.getRadiationRaw())
sleep(1)
end