From cc813454ac7890986039744d9b977c9db9777bf2 Mon Sep 17 00:00:00 2001 From: D4VID Date: Wed, 25 Dec 2024 19:52:34 +0100 Subject: [PATCH] Basic drone program --- drone.lua | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 drone.lua diff --git a/drone.lua b/drone.lua new file mode 100644 index 0000000..78b5b66 --- /dev/null +++ b/drone.lua @@ -0,0 +1,15 @@ +local drone = component.proxy(component.list("drone")()) + +local function fly(dx, dy, dz) + drone.move(dx, dy, dz) + + while drone.getOffset() > 1 do + computer.pullSignal(0.1) + end +end +while true do + fly(0,2,0) + fly(10,0,0) + fly(-10,0,0) + fly(0,-2,0) +end