Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local turbiny={}
- local mon = peripheral.wrap("right")
- function printTurbineInfo(turbine,pos)
- local rpm = turbine.getRotorSpeed()
- mon.setCursorPos(1,pos)
- print("Turbina "..pos..": "..rpm.." RPM")
- end
- for i,v in pairs(peripheral.getNames()) do
- turbiny[i] = peripheral.wrap(v)
- if turbiny[i] then
- print("dodano turbine do tabeli "..i)
- else
- print("nie mozna dodac turbiny do tabeli "..i)
- end
- end
- while true do
- sleep(1)
- mon.clear()
- for i,v in pairs(turbiny) do
- printTurbineInfo(v,i)
- print("Wyslano drukowanie turbiny "..i)
- end
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement