Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- local function findPeripheral( t, e )
- t = t:lower()
- for _,s in pairs(rs.getSides()) do
- if peripheral.getType(s) == t then
- return peripheral.wrap(s)
- end
- end
- error("No "..(e or t).." attached to the computer.", 0)
- end
- while true do
- term.clear()
- term.setCursorPos(1,1)
- if t.getRotorSpeed() > 1850 then
- t.setInductorEngaged(true)
- print("turned On the coils!")
- sleep(10)
- elseif t.getRotorSpeed() < 1830 then
- t.setInductorEngaged(false)
- print("Turned off the coils!")
- sleep(2)
- end
- sleep(5)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement