--- /dev/null
+-- xy gantry with deployer and shears
+
+-- timings
+-- works with 64 RPM
+local vertical_tick = 0.5
+local horizontal_time = 4.5
+local stanby_time = 60*30
+local rows = 10
+
+-- redstone IO
+local enable = "front" -- input: true -> enable
+local y_gearshift = "left" -- output: true -> move home
+local y_clutch = "top" -- output: true -> disengage
+
+local reset = function()
+ for _, out in pairs({y_gearshift, y_clutch}) do
+ rs.setOutput(out, false)
+ end
+end
+
+local up = function()
+ rs.setOutput(y_gearshift, true)
+ rs.setOutput(y_clutch, false)
+ os.sleep(vertical_tick)
+ rs.setOutput(y_cluctch, true)
+end
+
+local harvest = function()
+ for i = 1, rows-1 do
+ up()
+ os.sleep(horizontal_time)
+ end
+ reset()
+end
+
+while true do
+ if rs.getInput(enable) then
+ harvest()
+ os.sleep(standby_time)
+ else
+ os.pullEvent("redstone")
+ end
+end