ComputerCraft probe ♥! (1.56)

light sensor model

blink.lua => blink right ZN XN

print("****START****")
local tArgs = { ... }
if #tArgs < 2 then
	print( "Usage: blink <period> <out>" )
	return
end

local period = tArgs[1]
local out = tArgs[2]

peripheral.call("right","writeDirection",out,false)
peripheral.call("right","writeDirection",period,true)

while true do
  peripheral.call("right","writeOutput",out,1)
  os.sleep(peripheral.call("right","readInput",period,true)*2+0.05)
  print("*");
  peripheral.call("right","writeOutput",out,0)
  os.sleep(peripheral.call("right","readInput",period,true)*2+0.05)
  print("**");
end
print("*****END*****")