Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal

Archived

This topic is now archived and is closed to further replies.

  • 0
User_OC

Assembler - automatic creation of the robot

Question

I want to automate the production of robots.
Robot-builder is coming to assembler and runs the program:
 

local robot = require("robot")
local c = require("component")
local ic = c.inventory_controller


robot.select(1)           
ic.dropIntoSlot(3, 1, 1)
robot.select(2)           
ic.dropIntoSlot(3, 5, 1)
robot.select(3)          
ic.dropIntoSlot(3, 6, 1)
robot.select(4)          
ic.dropIntoSlot(3, 4, 1)
robot.select(5)          
ic.dropIntoSlot(3, 14, 1)
robot.select(6)           
ic.dropIntoSlot(3, 17, 1)
robot.select(7)          
ic.dropIntoSlot(3, 18, 1)
robot.select(7)          
ic.dropIntoSlot(3, 19, 1)
robot.select(8)          
ic.dropIntoSlot(3, 21, 1)
robot.select(9)         
ic.dropIntoSlot(3, 20, 1)
robot.select(11)        
ic.dropIntoSlot(3, 3, 1)
robot.select(12)        
ic.dropIntoSlot(3, 7, 1)
robot.use() -- ??????????

Location of components in the robot-builders:
post-1857-0-23742700-1428156585_thumb.jpg

After assembly, the components are arranged as follows:

post-1857-0-39218700-1428157020_thumb.jpg

 

I have a question: how can activate the button "Assemble"?
Team "robot.use ()" does not include this button.

Share this post


Link to post
Share on other sites

16 answers to this question

Recommended Posts

Since robots can't use external components, you'll need to have a computer trigger that, using the component the assembler exposes (`assembler.start()`). You can use networking or redstone to have the robot tell the computer to start the assembler.

Share this post


Link to post
Share on other sites

Thank U. :)
I'll try to experiment. If I fail, I have you to ask more questions. Okay?

---------
Sorry :)  - I use to translate Google-translate.

Share this post


Link to post
Share on other sites

I connected the computer to the assembler (set next).
On the computer I ran this program:

local assembler = require("assembler")

assembler.start()

On-screen error: this module is not found.
I is difficult to figure out which classes and libraries exist in OpenComputers and how they are related to specific modules (eg with Assembler).
So I suggested a version of the program with the operator [assembler.start()]

Share this post


Link to post
Share on other sites

(My answer, copied from MCF)

 

The assembler is a component, what you're trying to do is load a library called "assembler" and call a method on that.

What you want is to get the component library, then get the assembler component, and call the method on that:


require("component").assembler.start()


Do note that robots can't interact with external components, so you'll need to have a computer call that. You can have your robot communicate with a computer making that call using redstone signals or OC networking.

Share this post


Link to post
Share on other sites

There is a new problem. We have assembled a robot.

But how to activate it? How to make automatic pressing "Turn on"?

 

Optional (if not hard):
- How robots can exchange items?
- The robot can access the inventory of another robot?

Share this post


Link to post
Share on other sites

Any kind of computer (including robots) can be powered on by sneak-right-clicking, but I don't think robots can "sneak"... Item exchange between robots shouldn't be hard, you should be able to put items into the other robot as if it were a chest.

Share this post


Link to post
Share on other sites

Here we are talking about automating this process.
If you use the right button [robot.use ()], to open the robot,
and then the left button [robot.swing ()], to press the power button on the robot,
the robot will not turn on, these commands do not work.

local robot = require("robot")

robot.use()
robot.swing()

Share this post


Link to post
Share on other sites

Robots can't use GUIs, so in this case robot.use() does nothing. If you run robot.swing() afterwards it will try to punch/mine the robot. The reason why I suggested the sneak-right-click method was because that doesn't require any GUI interaction, but unfortunately robots cannot do a sneak-use, so that isn't an option either.

Share this post


Link to post
Share on other sites

If I can not automatically turn on the robot,
this means that:
- It is impossible to implement automated production robots.
- Can not be automated production chains with these robots.

The only hope - is the guru OpenComputers and programming Sangar.
:)

Share this post


Link to post
Share on other sites

I thinks its possible to have wake functions for the robot. Either through the redstone card or with the modem card. Pretty sure you can do it with modem. Something like modem.setWakeMessage(string)

Also redstone.setWakeThreshold(numberStrength)

Share this post


Link to post
Share on other sites

The question is whether that setting is stored on the actual card item. If not, then there would be no way to set that setting on a fresh robot without manually powering it on.

Share this post


Link to post
Share on other sites

Actually, you can sneak-right-click with a robot, you just need to pass in true as the second argument. And it seems you can indeed shift-right-click (with an empty hand) to turn on computers  and robots, so glad I learned this!

Share this post


Link to post
Share on other sites

Actually, you can sneak-right-click with a robot, you just need to pass in true as the second argument. And it seems you can indeed shift-right-click (with an empty hand) to turn on computers  and robots, so glad I learned this!

:D :D :D

 

Thank you very much!

The robot turns on.

local robot = require("robot")
robot.use(3, true)

This command works.

Now it will be possible to do fully automatic cycle for the production of robots.

Some robots will make other robots, and they in turn will perform the necessary work in the automatic mode - miners, farmers, construction of buildings, etc ..

----------

It remains only to solve the problem with the recording to hard disk needed robot programs. :rolleyes:

Share this post


Link to post
Share on other sites

OMG. thanks for sharing a way of building Skynet in Minecraft! Kind of awesome.

If i have some time left I will develop Skynet :D

Share this post


Link to post
Share on other sites

Hello!
How can I turn off the computer?
The robot is in front of the computer.
If you execute this command, the computer will turn on:

robot.use(3, true)

Tried these commands, but the computer does not turn off:

robot.use(3, false)
robot.swing(3)

 

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use and Privacy Policy.