Jump to content
  • Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
  • 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.

Link to post
Share on other sites

16 answers to this question

Recommended Posts

  • 0

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.

Link to post
Share on other sites
  • 0

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()]

Link to post
Share on other sites
  • 0

(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.

Link to post
Share on other sites
  • 0

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()

Link to post
Share on other sites
  • 0

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.

Link to post
Share on other sites
  • 0

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.
:)

Link to post
Share on other sites
  • 0

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)

Link to post
Share on other sites
  • 0

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:

Link to post
Share on other sites
  • 0

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)

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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