Jump to content




[cc 1.4] Turtle Remote Control V 2.0

turtle wireless utility

168 replies to this topic

#1 Heracles421

  • Members
  • 258 posts

Posted 02 October 2012 - 09:30 PM

Turtle Remote Control V 2.0

As the title just says, this is a remote control for a turtle, it uses the rednet system to transmit messages to a turtle, which then makes an action. It currently has 22 programed actions, you could add more actions if you want.

This actions are:
  • Move Forward / Backward
  • Move Up / Down
  • Turn to the Left or to the Right
  • Break blocks in any possible direction
  • Place blocks in any possible direction
  • Change active slot
  • Output a redstone signal
  • Refuel using coal found in the inventory
  • Attack in all possible directions
  • Mine in all possible directions
  • *NEW!* Run programs loaded in the turtle
Pictures:
Spoiler


Code:
Spoiler
[/font]

Installation:
Spoiler


Changelog:
Spoiler


Want to support the program? Add this banners to your signature!

Posted Image
[url=http://www.computercraft.info/forums2/index.php?/topic/4663-1314-turtle-remote-control-v14/][IMG]http://i885.photobucket.com/albums/ac59/Greene1200/turtleRemote_Banner.png[/IMG][/url]

Posted Image
[url=http://www.computercraft.info/forums2/index.php?/topic/4663-1314-turtle-remote-control-v14/][IMG]http://i885.photobucket.com/albums/ac59/Greene1200/turtleRemote_Banner_mini.png[/IMG][/url]

Posted Image
[url=http://www.computercraft.info/forums2/index.php?/topic/4663-1314-turtle-remote-control-v14/][IMG]http://i885.photobucket.com/albums/ac59/Greene1200/820FCAFB-D02F-47F0-8E46-9D390F66F45E-3664-0000019C49538AB8.jpg[/IMG][/url]

Posted Image
[url=http://www.computercraft.info/forums2/index.php?/topic/4663-1314-turtle-remote-control-v14/][IMG]http://i885.photobucket.com/albums/ac59/Greene1200/58B4B305-CE13-4113-8E14-C5FB4B05FD2A-3664-0000019C4AB1DE20.jpg[/IMG][/url]


#2 Tiin57

    Java Lunatic

  • Members
  • 1,412 posts
  • LocationIndiana, United States

Posted 03 October 2012 - 07:26 PM

View PostHeracles421, on 02 October 2012 - 09:30 PM, said:

Well, first of all I'd like to say that I didn't know if this should go on the Trutle Programs sub-forum or here, because it includes both sides, turtles and computer. If someone can confirm this please contact me.
Yes, this probably should have gone in the turtle subforum. Yes, there are half a dozen like this. But good job nonetheless.

#3 Fatal_Exception

  • New Members
  • 105 posts

Posted 03 October 2012 - 10:09 PM

Comic Sans. That is all.

#4 ScruffyRules

  • Members
  • 98 posts

Posted 10 October 2012 - 11:46 AM

This is great , i made some other commands like kill and mining(For mining turtle(s)!) ones to!

#5 jesusthekiller

  • Banned
  • 562 posts
  • LocationWrocław, Poland

Posted 10 October 2012 - 02:38 PM

Nice job, I was working on something similar to it, but I abandoned this project - started working on PHP script for 3Conomy :P/>

#6 Heracles421

  • Members
  • 258 posts

Posted 10 October 2012 - 08:52 PM

View Postjesusthekiller, on 10 October 2012 - 02:38 PM, said:

Nice job, I was working on something similar to it, but I abandoned this project - started working on PHP script for 3Conomy :P/>
Thanks

View PostScruffyRules, on 10 October 2012 - 11:46 AM, said:

This is great , i made some other commands like kill and mining(For mining turtle(s)!) ones to!
Would you like me to add those things to the program?

#7 ScruffyRules

  • Members
  • 98 posts

Posted 11 October 2012 - 06:21 AM

View PostHeracles421, on 10 October 2012 - 08:52 PM, said:

View PostScruffyRules, on 10 October 2012 - 11:46 AM, said:

This is great , i made some other commands like kill and mining(For mining turtle(s)!) ones to!
Would you like me to add those things to the program?
dont need mining as i saw in the code! :P/> and sure if you want!P.S i made a kill all button for easier off switch!

#8 Heracles421

  • Members
  • 258 posts

Posted 11 October 2012 - 09:28 PM

View PostScruffyRules, on 11 October 2012 - 06:21 AM, said:

View PostHeracles421, on 10 October 2012 - 08:52 PM, said:

View PostScruffyRules, on 10 October 2012 - 11:46 AM, said:

This is great , i made some other commands like kill and mining(For mining turtle(s)!) ones to!
Would you like me to add those things to the program?
dont need mining as i saw in the code! :P/> and sure if you want!P.S i made a kill all button for easier off switch!
I'll add some security systems to the programs later on, I just have to wait till I get better. I've been sick for a week

#9 ScruffyRules

  • Members
  • 98 posts

Posted 12 October 2012 - 09:51 AM

View PostHeracles421, on 11 October 2012 - 09:28 PM, said:

View PostScruffyRules, on 11 October 2012 - 06:21 AM, said:

View PostHeracles421, on 10 October 2012 - 08:52 PM, said:

View PostScruffyRules, on 10 October 2012 - 11:46 AM, said:

This is great , i made some other commands like kill and mining(For mining turtle(s)!) ones to!
Would you like me to add those things to the program?
dont need mining as i saw in the code! :)/> and sure if you want!P.S i made a kill all button for easier off switch!
I'll add some security systems to the programs later on, I just have to wait till I get better. I've been sick for a week
sickness = bad :/

#10 timia2109

  • Members
  • 71 posts

Posted 14 October 2012 - 05:33 PM

Hey I've modded the programs add some Features, edit Rednet.broadcast to rednet.send and make a Master for turtle will you See it?
Here the link for a install disk : https://docs.google....HZhNjVNOTg/edit

#11 Heracles421

  • Members
  • 258 posts

Posted 16 October 2012 - 09:24 PM

View Posttimia2109, on 14 October 2012 - 05:33 PM, said:

Hey I've modded the programs add some Features, edit Rednet.broadcast to rednet.send and make a Master for turtle will you See it?
Here the link for a install disk : https://docs.google....HZhNjVNOTg/edit
Sure, I'll check them in a minute

#12 ChunLing

  • Members
  • 2,027 posts

Posted 17 October 2012 - 01:12 AM

I use the following loop in my remote control program:
while cldt.rcID do cldt[2],rnmssg = rednet.receive()
  if cldt[2] == cldt.rcID then
   _,_,cldt[3], cldt[4] = rnmssg:find("^(%a+)(.*)")
   if turtle[cldt[3]] then trply(tostring(turtle[cldt[3]](tonumber(cldt[4]))))
   elseif rctfncs[cldt[3]] then rctfncs[cldt[3]]()
   elseif rnmssg == "trmn8RC" then cldt.rcID = nil end
  end
end
Cleaned up a bit it can look like this:
while cldt.rcID do sndrID,rnmssg = rednet.receive()
  if sndrID == cldt.rcID then
   _,_,cmnd, prm1 = rnmssg:find("^(%a+)(.*)")
   if turtle[cmnd] then rednet.send(cldt.rcID,tostring(turtle[cmnd](tonumber(prm1))))
   elseif rnmssg == "trmn8RC" then cldt.rcID = nil end
  end
end
This loop keeps receiving messages until it gets a message from the ID of it's controller. It then does a simple bit of processing on the rednet message from it's controller to turn it into a command and a parameter. It then checks if there is such a command under the turtle API, and if there is, it executes that command with the parameter (converted to number), sending back the function result (converted to string) to the controlling computer.

This allows you to execute every command in the turtle API, and get back the result as a rednet message.

#13 MrZuribachi

  • New Members
  • 44 posts
  • LocationGermany

Posted 17 October 2012 - 03:26 PM

That's gonna be epic. I've already seen another remote here on the forums, but that has no option for moving up / down or placing blocks. But an environment-scanner, a fuel-display and a refuel-button would be very usefull. Would be great if you can manage to add them.

#14 ChunLing

  • Members
  • 2,027 posts

Posted 17 October 2012 - 04:00 PM

The version in my clfn program has access to a number of functions designed for easier remote control (including the easy refuel command you mention). They are the rctfncs removed from the "cleaned up" version (due to the fact that if you are attempting to use this code in your own program rather than just using mine, the rctfncs will not be defined).

I'm not sure what you mean by "environment-scanner". If you mean using the turtle.detect and turtle.compare functions, and getting the output, then you can do this through the provided loop (even without the rctfncs) and you will get the results of those back by rednet. If you mean some kind of turtle addon/peripheral, then those must be coded into a mod and would be found in the peripherals and turtle addons forum.

#15 Heracles421

  • Members
  • 258 posts

Posted 17 October 2012 - 08:18 PM

Well, I'll add the fuel level to the computer screen. About the enviorment scaner.... If you mean checking if a block is below/abobe/in front and making a map..... That's going to take quite some time

#16 ScruffyRules

  • Members
  • 98 posts

Posted 17 October 2012 - 10:18 PM

View PostHeracles421, on 17 October 2012 - 08:18 PM, said:

Well, I'll add the fuel level to the computer screen. About the enviorment scaner.... If you mean checking if a block is below/abobe/in front and making a map..... That's going to take quite some time
i wouldn't bother with the enviorment scaner/map its to much work... also nice idea with the fuel! :P/>

#17 Heracles421

  • Members
  • 258 posts

Posted 18 October 2012 - 02:41 AM

View PostScruffyRules, on 17 October 2012 - 10:18 PM, said:

View PostHeracles421, on 17 October 2012 - 08:18 PM, said:

Well, I'll add the fuel level to the computer screen. About the enviorment scaner.... If you mean checking if a block is below/abobe/in front and making a map..... That's going to take quite some time
i wouldn't bother with the enviorment scaner/map its to much work... also nice idea with the fuel! :P/>
Well yea, you're right. I've finished the re-fuel function, it's really cool. All I need now is the fuel meter and I'll release V 1.1
I've been thinking of changing the way you send commands for a menu, rather than having different keys mapped to a command. What do you think?

#18 ChunLing

  • Members
  • 2,027 posts

Posted 18 October 2012 - 04:04 AM

That seems doable since you only support a dozen functions. But if you supported the full turtle functionality, you'd have to go the other way and add a command to read() a rednet string to send.

#19 ScruffyRules

  • Members
  • 98 posts

Posted 18 October 2012 - 05:49 AM

View PostHeracles421, on 18 October 2012 - 02:41 AM, said:

View PostScruffyRules, on 17 October 2012 - 10:18 PM, said:

View PostHeracles421, on 17 October 2012 - 08:18 PM, said:

Well, I'll add the fuel level to the computer screen. About the enviorment scaner.... If you mean checking if a block is below/abobe/in front and making a map..... That's going to take quite some time
i wouldn't bother with the enviorment scaner/map its to much work... also nice idea with the fuel! :P/>
Well yea, you're right. I've finished the re-fuel function, it's really cool. All I need now is the fuel meter and I'll release V 1.1
I've been thinking of changing the way you send commands for a menu, rather than having different keys mapped to a command. What do you think?
I would really like the cmd based system maybe a loop kinda thing like "Forward 10".

#20 ChunLing

  • Members
  • 2,027 posts

Posted 18 October 2012 - 06:08 AM

I support that functionality in my remote control turtle program, posted in the turtle programs forum under User Friendly Program combining several useful functions. But nobody seems to like my program. I find it super easy to use and very powerful, but maybe there is something wrong with it?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users