redstone event

From ComputerCraft
Jump to: navigation, search
redstone
Event
Returns

Source CC:Tweaked

Occurs when the redstone input on any side of the computer changes.

ExampleExampleWait for a redstone change
Prints every time the redstone input changes.
Code
while true do
  local event = os.pullEvent('redstone')
  print("Redstone changed!")
end