This is a read-only snapshot of the ComputerCraft forums, taken in April 2020.
Idesta's profile picture

turtle and computer freeze, need help.

Started by Idesta, 13 January 2013 - 06:48 AM
Idesta #1
Posted 13 January 2013 - 07:48 AM
So basically I asked in a previous topic how to have a computer send a wireless signal to the turtle to begin it's program when the computer had a redstone signal input.

this is what I have.

computer

local event, p1 = os.pullEvent("redstone")
  if rs.getInput("back") then
    rednet.open ("left")
    rednet.broadcast ("start")
    rednet.close ("left")
  end

turtle.

while true do
  rednet.open("right")
  local id, msg = rednet.receive()
  rednet.close("right")
  if msg == "start" then
    turtle.forward()
    turtle.forward()
    turtle.forward()
    turtle.turnLeft()
    turtle.forward()
    turtle.dig()
    turtle.digUp()
    turtle.up()
    turtle.dig()
    turtle.digUp()
    turtle.up()
    turtle.dig()
    turtle.digUp()
    turtle.up()
    turtle.dig()
    turtle.digUp()
    turtle.up()
    turtle.dig()
    turtle.digUp()
    turtle.up()
    turtle.dig()
    turtle.digUp()
    turtle.up()
    turtle.dig()
    turtle.digUp()
    turtle.up()
    turtle.dig()
    turtle.digUp()
    turtle.up()

    turtle.dig()
    turtle.down()
    turtle.down()
    turtle.down()
    turtle.down()
    turtle.down()
    turtle.down()
    turtle.down()
    turtle.down()
    turtle.select(9)
    turtle.place()
    turtle.turnLeft()
    turtle.forward()
    turtle.forward()
    turtle.forward()
    turtle.turnLeft()
    turtle.select(1)
    turtle.drop()
    turtle.forward()
    turtle.turnLeft()
  end

I don't know exactly is going wrong but both the computer and the turtle freeze when I run the program on each.
crazyguymgd #2
Posted 13 January 2013 - 08:07 AM
They're probably not actually freezing but just waiting for input. So did you ever actually send the redstone input to the computer?