3 posts
Posted 01 February 2014 - 09:30 PM
hey guys :D/>
im new to computercraft, and lua language too. so i hoped to get some help here.
i googled for tutorials, searched here in the forum, but nothing seems to tell me what i need to know.
i want to create a simple touch interface to turn my autospawner and grinder on and off.
i thought about something like this:
i hope its possible to click directly on "active" or "inactive" to enable or disable the spawner / grinder
the grinder is connected on the left side of the computer, Spawner on the right via simple red alloy wire. so the touch have to enable or disable the redstone signal like a lever.
Would somebody do me that favor and can write such a program for me?
Edited on 02 February 2014 - 11:16 AM
8543 posts
Posted 01 February 2014 - 10:48 PM
Ask a Pro isn't really the section for program requests, we mostly help people fix or finish the code they currently have.
29 posts
Posted 01 February 2014 - 10:55 PM
I can probably write it, but do you want it on a monitor?
3 posts
Posted 02 February 2014 - 07:43 AM
@Final
Yes i got a 2x2 block sized monitor on top of the computer
@Lyqyd
if it dont fits in here its ok if you move it to the right section of the forum :)/>
29 posts
Posted 02 February 2014 - 08:44 PM
@Final
Yes i got a 2x2 block sized monitor on top of the computer
@Lyqyd
if it dont fits in here its ok if you move it to the right section of the forum :)/>/>/>
OK.
btw, Can you make it 1x1 instead?
I can make a layout like this
————-
|S|P|A|W|N|E|R|
————-
| |O|N| |O|F|F| |
——————
Empty row
——————
G R I N D E R
—————–
O N O F F
Edited on 02 February 2014 - 07:48 PM
63 posts
Location
Mannin
Posted 02 February 2014 - 09:05 PM
i'd suggest watching this:
http://www.youtube.com/watch?v=1nuMDtmnEjgyou say you're new to lua and CC, but you didn't say you're new to programming, so that video should be pretty simple to follow…
you could quickly get something running with it even if it didn't work… once you get that far [because that will be fun, i assure you] then you could post what you have got so far to pastebin and people can help…
the problem with just asking for "this thing" is that your appreciation of the request may differ from everyone else's who reads what you need… of course, your need sounds pretty simple - but because of that, you should be able to work out from dire's video exactly how to implement his touch screen button api… and if you don't you'll have at least learnt something in the process - and that's the fun, right? ;)/>
286 posts
Location
United States
Posted 02 February 2014 - 09:21 PM
Touch screens are fairly straight forward, and very satisfying to complete when you figure it out. Essentially, what you need to know:
Finally, have fun. Post your actual code problems in Ask a Pro and somebody will help you.
3 posts
Posted 03 February 2014 - 05:42 AM
@Final: i would like to have an optical indicator if its on or off. just like the pic i posted initially.
@ingi… i would like to use that API and the base of the program… the only thing i need to add is the Redstone signal if the button is toggled
@surferpup thanks for the links… hope i can get something out of it
EDIT: i got it. i took the Direwolf API and shortened the table of the main programm, added a getTable function in the API to read the activity status, and added a redstone string in the main programm… works fine :D/>
Edited on 03 February 2014 - 09:40 PM
286 posts
Location
United States
Posted 05 February 2014 - 02:17 PM
Since then, I posted a full answer for you in response to a similar question, and a few of us are writing a full tutorial: