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

Remote Control GUI

Started by Ninja8370, 03 March 2015 - 08:59 PM
Ninja8370 #1
Posted 03 March 2015 - 09:59 PM
I have started making a program so that advanced wireless pocket computers can wirelessly control turtles with a GUI. I have made this specifically for mining turtles, but the movment and redstone commands should work for all turtles. The turtles can be regular or advanced to do this.
I know there are probably better turtle control programs out there (I actually saw another one near this in the forums) But I started developing this just to help me learn Lua, and since it's at least usable I thought I'd put it on forums. Suggestions are welcomed as they give me more ideas for this and help me learn Lua to a fuller extent!

This program is still in development and I am open to suggestions!

Changelog
Spoiler1.0 -
- (Doesn't work on other turtles except mine)

1.5 -
+ (Updated so it can work on any turtle)

2.0-
++Updated to make setup much more user-friendly

2.1 -
+/- Updated to increase redstone control capabilities (Added redstone up/down buttons but bug keeps them from working)
+ Added dig up and place up capabilities.

2.2 -
+ Redstone now works as a 3 second pulse!
- Crash if the program was terminated while inputing ID number (fixed!)

*2.3 - (Coming soon!)
++Updated GUI using some of Jasper's suggestions.
+ Ability to change target Turtle ID after setup without editing config. (Part of the new GUI)


Pictures:
Spoiler











Dev Pictures
Spoiler






Installation


There are 2 pastebins for the startups. The startups will update your version every time your computer is restarted or you run startup again.

Install this on your turtle: (Preferably mining turtle)
pastebin get DnibQGrP startup


Install this on your Advanced Wireless Pocket Computer: (You can also install on any other advanced wireless computer, but Pocket is mobile, and GUI is designed for Pocket)
pastebin get MwvE7HdD startup

Setup:
SpoilerOnce you install both a little setup is required. The setup instructions are provided on the Turtle's screen, but I will post them here also. (Note, in v2.0 these steps shouldn't be needed)On the Pocket Computer, Terminate the program after it starts up.
Then go to the config file that should've been generated. Change the number there to the ID that is displayed on your turtle after you run startup on it.
After you set this ID right, you can run startup again on your pocket computer (By typing in startup and pressing enter in shell) and you should be able to remote control your turtle!


As of v2.0 just follow onscreen instructions!


For any suggestions or help please contact me here!

Thanks and Credits
SpoilerMany thanks to GreenGene and Robert00001 (Troll) for their help with this.
Also to Jasper for giving me great suggestions on how to improve the GUI!
Edited on 04 March 2015 - 08:59 PM
Ninja8370 #2
Posted 03 March 2015 - 10:44 PM
Doing a lot of editing atm trying to get something to work, so there will be some bugs in software.
Ninja8370 #3
Posted 04 March 2015 - 12:39 AM
Hmm I was trying to make it so you can press any key to terminate the program,(on the turtle) but I tried multiple ways and it created problems. (Either didn't work itself or prevented my program from working in any way.) I could make it do it with a button, but this would only work on advanced turtles. If anyone has any advice please help! (My skype is Ninja8370 if you'd rather contact me with that)
Ninja8370 #4
Posted 04 March 2015 - 01:08 AM
Added pictures to original post.
Edited on 04 March 2015 - 12:08 AM
Ninja8370 #5
Posted 04 March 2015 - 03:14 PM
Updated to v2.0
Changelog:
Added setup so that you do not need to terminate and edit config file.
bugfixes.

Upcoming versions:
v2.1 - Increased Redstone Controls, DigUp, and PlaceUp!
v2.2 - Bugfixes, small suggestions!
v2.3 - Updated GUI based off suggestions from Jasper!


Pictures updated for v2.0!
Edited on 04 March 2015 - 04:33 PM
Ninja8370 #6
Posted 04 March 2015 - 05:52 PM
Ran into some complications with update 2.1
For some reason redstone will not activate until the Turtle program is terminated and restarted. If anyone knows how to fix this, please help!

I already tried making it so that when the command is received to turn on redstone, it turns it on and restarts the program (With shell.run("pastebin run **devupdate") (I have the real link in for devupdate but I don't want to post it here.)

I will push through with this update and add digUp and placeUp. Redstone will have to be fixed on a later update. (Maybe 2.2 since it's a bug fixing update)
Edited on 04 March 2015 - 07:12 PM
Ninja8370 #7
Posted 04 March 2015 - 08:42 PM
Updated to v2.1
Changelog:
+ Added digUp button/function
+ Added placeUp button/function
+/-Added redstone up and down, but does not work. Will try to fix in next update.

Upcoming versions:
v2.2 - Bugfixes, small suggestions!
v2.3 - Updated GUI based off suggestions from Jasper!
Edited on 05 March 2015 - 11:09 AM
Ninja8370 #8
Posted 04 March 2015 - 09:57 PM
Updated to v2.2
Changelog:
+ Redstone now works as a 3 second pulse!
- Used to stop working if you terminated during setup- fixed!

Upcoming versions:

v2.3 - Updated GUI based off suggestions from Jasper!

v2.3 will take a little bit longer to release because it will have a lot of updates in it. I expect to have it done in two or three days. :)/>/>
Edited on 04 March 2015 - 08:57 PM
Ninja8370 #9
Posted 04 March 2015 - 10:08 PM
Next Update

The next update is going to be bigger than the last two, and will take a little longer. It is all about updating the GUI. So far I'm adding two pages. The setup page so that you can get to it any time from the GUI and change the ID of the turtle you're directing; And the Inventory page; instead of having the inventory slot selection on the side of your screen it will have it's own page and the slots will be organized the same way they are on the turtle. There will also be buttons to drop and suck on the Inventory page. :)/>

If there are any other GUI change you think this needs please feel free to help me out and suggest them!
Ninja8370 #10
Posted 07 March 2015 - 01:51 AM
The update will be postponed at least one day. I had to help my dad a while on the farm today as he hurt his back recently.
I will try to work on the update tomorow, but it may get released Sunday.
Ninja8370 #11
Posted 08 March 2015 - 02:53 AM
Updated to v2.3!
Changelog:
+ Hugely improved GUI! Now features the following pages- Menu, Movement (Turtle Movement), Inventory (More controls for your turtle inventory!), and Settings.
+ Settings! You can now change your target turtle's ID from the GUI, and I included a text command box now. You can send normal text commands if you want instead of using the GUI. I will later improve on this and make it so you can run programs you put on your turtle.

Upcoming versions:

v2.4 Bugfixes! {fix turtle program tabbing}

v2.5 Cool updates! More info coming soon!



Wait for it!….

Update: (3/30/15)
Sorry I had to catch up a lot on school and was unable to do programming for a while. I may soon (Within or soon after the next two weeks) be able to resume my work on this. v2.3 is almost ready to be released but I never got to it, so hopefully I can get that done.
Edited on 30 March 2015 - 09:52 PM
Lupus590 #12
Posted 08 March 2015 - 10:31 PM
Looks good, keep it up.
Konlab #13
Posted 19 March 2015 - 04:33 PM
Good idea :)/>
Add info-getting options (compare or the new id get things)
Also a turtle-lock would be good
(No access to turtle until a button is pressed on the remote c. Pocket com.
Ninja8370 #14
Posted 26 March 2015 - 04:15 PM
Okay, thankyou for your support and suggestions :)/>. Unfortunately I can't work on this for a while (and havn't been able to work on it for a couple weeks) because I got a little behind on my school. I need to catch up on my school and then hopefully I can get back to developing this! :)/>

Konlab I like your info getting idea, and I was thinking of including that in v2.3 update. On the main remote control GUI it does tell you what turtle ID you have your controller set to control.

I was mostly done with v2.3 so maybe I can release that before I can really get back to developing this.
Ninja8370 #15
Posted 30 March 2015 - 11:53 PM
Update: (Also added to last version update post, since this is the reason that version wasn't released yet)

Sorry I had to catch up a lot on school and was unable to do programming for a while.
I may soon (Within or soon after the next two weeks) be able to resume my work on this.
v2.3 is almost ready to be released but I never got to it, so hopefully I can get that done.
_removed #16
Posted 15 April 2015 - 04:15 PM
I made something like this ages ago, and it is still functional. Maybe you would like to take a look at it?
ry00000 #17
Posted 15 April 2015 - 05:01 PM
Hi smigger, we met on LuaLand, my IGN is ry00000, i can help with some things
alex82 #18
Posted 21 April 2015 - 03:30 PM
Awesome! It works, but you should add a refuel button :D/>
Ninja8370 #19
Posted 22 April 2015 - 11:04 PM
Awesome! It works, but you should add a refuel button :D/>

That is a good idea, I can include that in my next update. Sorry about not working on this at all recently, but I had to catch up on school and then I had PSSAs (State tests) the last 2 weeks.
Ninja8370 #20
Posted 30 April 2015 - 12:10 AM
There seems to be something wrong with the setup in v2.2, I'm not sure exactly what it is, I'll try to look into it soon.
If you're trying to put in your turtle ID and it keeps going to the screen, terminate and edit config and type in the name of the turtle. This should be fixed in v2.3!
Kleszcz #21
Posted 07 June 2015 - 12:43 AM
There is still problem with this.
lare290 #22
Posted 04 July 2015 - 11:40 PM
This is cool, like CCEdu but with normal turtles.