Posted 03 September 2012 - 02:40 AM
I am having problems with my first program. I am trying to run a basic redstone signal from right, back and left to a wireless transmitters. I want to just log in and see:
Welcome to East Quarry Control Computer
Please enter one of the following to activate:
1 - Water Pumps
2 - Quarry Engine 1
3 - Quarry Engine 2
_
Any help is greatly appreciated.. here is my code:
Welcome to East Quarry Control Computer
Please enter one of the following to activate:
1 - Water Pumps
2 - Quarry Engine 1
3 - Quarry Engine 2
_
Any help is greatly appreciated.. here is my code:
while true do
term.clear()
term.setCursorPos(1, 1)
print("Welcome to East Quarry Control Computer")
print("Please enter one of the following to activate:")
print("1 - Water Pumps")
print("2 - Quarry Engine 1")
print("3 - Quarry Engine 2")
input = io.read()
if input == "1" then
redstone.setOutput("right", true)
sleep(1)
redstone.setOutput("right", false)
end
else if input == "2" then
redstone.setOutput("back", true)
sleep(1)
redstone.setOutput("back", false)
end
else if input == "3" then
redstone.setOutput("left", true)
sleep(1)
redstone.setOutput("left", false)
end
else
term.clear
term.setCursorPos (1,1)
print("Incorrect input")
end
end