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

Computer And Miner Communication Problem

Started by sumeth, 24 February 2012 - 04:17 PM
sumeth #1
Posted 24 February 2012 - 05:17 PM
Ok i got a problem, im trying to have a computer control a miner turtle. however i try to have the computer send the miner a parameter to tell it to start mining (yes the miner is running the program first) however neither the stop or the start function work with the miner but it works with the computer, help pleasehttp://pastebin.com/61K0E3x1
Liraal #2
Posted 24 February 2012 - 05:25 PM
par1 of rednet+message event is the sender id. it's numerical. You should probably change it to par2.
sumeth #3
Posted 24 February 2012 - 05:27 PM
Omg, thank you!!!!!!!!!!!!!! B)/>/>
sorry for the noobieness :huh:/>/>
sumeth #4
Posted 24 February 2012 - 05:34 PM
Ok new problem, the miner wont stop when i enter stop into the terminal of the computer ( i think its the way i coded it) how would i change it if it is? http://pastebin.com/xdfDutfJ
Liraal #5
Posted 24 February 2012 - 05:40 PM
put the event, par1, par2=os.pullEvent() sequence into the repeat loop. that way it'll keep refreshing.
sumeth #6
Posted 24 February 2012 - 06:35 PM
Ok problem, ive change the input for the computer to receiving a redstone signal for the back powerd by the block from the mod wireless redstone. When i start the computer program will run once and then the computer program will just stop. http://pastebin.com/gg9PPDj1 (thanks for your awesome help!)
Liraal #7
Posted 24 February 2012 - 06:59 PM
insert 'signal = restone.getInput("back")' before the while loop so that it reads the signal before doing the while part
sumeth #8
Posted 24 February 2012 - 07:14 PM
I did that and now im getting an error saying mining:6: too long without yeilding http://pastebin.com/dC7W25bT
Liraal #9
Posted 24 February 2012 - 07:20 PM
insert 'local tmp=os.pullEvent()' between the two commands within the while. That would make it update only when something (like a redstone change) occured