1
0
mirror of https://github.com/osmarks/random-stuff synced 2024-11-08 21:39:56 +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