Jump to content

Recommended Posts

Posted

Hello!

So I am building a coffee shop similar to this one:

I have the coffee making system done, so far only one type.

I am stuck with the computer part of it.

The goal seems to have three wires going from under 3 different buttons to a computer, which tells filters and deployers, which coffee will be made.

And the most confusing part: how can I make the screen comment on the progress?

If I find help from here, I will be very VERY happy! :)

Posted

This question really has nothing to do with coffee, it seems, and everything to do with 2 of the computercraft APIs: terminal commands and bundled wire commands.

To set various wires in a bundled cable (let's assume the cable is connected to the BACK of the computer), you do:

>> rs.setBundledOutput("back", colors.red + colors.yellow + colors.black)

^That will turn the red, yellow, and black wires in the bundle on, and everything else off.

>>rs.setBundledOutput("back",0)

^That will turn all wires off.

Then you simple run your insulated colored wires to whatever devices are necessary to route the coffee through to the desired machines that make it the correct type.

To display stuff on the screen, use terminal commands. They are all pretty self explanatory:

http://computercraft.info/wiki/index.php?title=Term_(API)

("cursor" is where the little blinking line is that determines where the next character will be printed)

To display stuff on a monitor, you use the exact same terminal commands, but you run them from the monitor itself (which is its own computer, with its own programs). Usually people do this by having the main computer tell the monitor to run a pre-programmed file that has a script for a sequence of display things, using (for a monitor attached on the left):

>> shell.run("monitor" "left" "[name of program saved on monitor that has the display script]")

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...