Quipex icon

Disk/mem/redworks/programs/circuits/Timer

Quipex | PRO | 04/23/12 11:25:55 AM UTC | 0 ⭐ | 306 👁️ | Never ⏰ | []
text |

640 B

|

None

|

0 👍

/

0 👎

--1
--1
--1
input = {}
output = {}
extra = {}
input[1] = "front"
output[1] = "back"
extra[1] = "The delay of pulse."
  -- Simple Timer
-- Created by: FuzzyPurp
 local rRunning = true
term.clear()
term.setCursorPos(1,2)
print("Timer is now running with a " .. extra[1] .. " sec. delay.")
print("\nInput(s): " .. input[1] .. ".")
print("Output(s): " .. output[1] .. ".")
print("\nHold Control+R to reboot.")
print("Hold Control+T to terminate.")
  while rRunning do
  sleep(extra[1] - 0.1)
  if rs.getInput(input[1]) then 
    else
    rs.setOutput(output[1], true)
    sleep(0.1)
    rs.setOutput(output[1], false)
  end
end

Comments