How to infinitely loop redstone detection with computercraft (lua)

How to infinitely loop redstone detection with computercraft (lua) - Black and White Roller Coaster

I'm trying to make a harvester/planter out of computercraft computers, and I can get a redstone pulse consistent with a crop maturing, but cannot loop my command redstone.getInput("front") to keep checking without the program crashing.

-- Harvest Program
    --inf loop
while true do
    -- Redstatus is just a bool variable
    if RedStatus = redstone.getInput("front") then
    rednet.send(1, "shell.run("Harvest")")
end





Pictures about "How to infinitely loop redstone detection with computercraft (lua)"

How to infinitely loop redstone detection with computercraft (lua) - Man Taking Photo Through Ring Light
How to infinitely loop redstone detection with computercraft (lua) - Collection of Christmas decoration on white background
How to infinitely loop redstone detection with computercraft (lua) - Faceless person knitting in bright room



How do you use Lua in ComputerCraft?

ComputerCraft uses Lua because it is the perfect fit. It's a lightweight, interpreted language that is fairly powerful and quite adaptable.

Why is ComputerCraft in Lua?

ComputerCraft's Computers and Turtles are programmed with the easy-to-learn Lua programming language.

What language does ComputerCraft use?

ComputerCraft is a modification for Minecraft that's all about computer programming. It allows you to build in-game Computers and Turtles, and write programs for them using the Lua programming language. The addition of programming to Minecraft opens up a wide variety of new possibilities for automation and creativity.



Redstone in- and outputs - Computercraft Tutorial (Crafticy)




Sources: Stack Exchange - This article follows the attribution requirements of Stack Exchange and is licensed under CC BY-SA 3.0.

Images: Pixabay, Daniel Eliashevsky, Laura James, Anete Lusina