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

BloodyRum

Members
  • Content Count

    18
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by BloodyRum

  1. Anyone knows how to do this?

     

    Heres the code I tried

    component = require("component")
    barrel = component.mcp_mobius_betterbarrel
    stack = barrel.getInventorySize() --I have an inventory Controller in the adapter
    print(stack)
    

    And the Error I get when I try to run it

    /BarrelTest:3: attempt to call field 'getInventorySize' (a nil value)
    stack traceback:
        /BarrelTest:3: in main chunk
        (...tail calls...)
    
  2. I would love to see this added. Experienced coder you say? Here is a project for you. To make a supercomputer that has 1-2 "nodes" of full servers. Then write an API so the nodes act like namespaces. And the API would shift the variables around using the network. The think is the code has to know when to grab a variable and when to send one. 100 Brownie points if you can make an API for this along with an example program.

  3. The best thing for you to do Is to convert it yourself one line at a time. That will allow you to gain more OpenComputers knowledge yourself, And when you do find something you 100% cant figure out without help is went you should ask around on irc. If you really don't want to convert it yourself then just install cc and use that.

  4. This thought came to my mind and well I would like to share it since I think its really useful suggestion.  Here goes: by using 3d printer, you could enable the creation of custom shells for robot.  Imagine personalizing the robots by their duties.  A mining robot with the skin of cobblestone and farming robot would go with the appearance of tilled dirt or leaves for timber robot.  I dont know how hard to make this but it would enhance the use of 3d printer for robots (perhaps drone to, not sure.)

     

    The assembler could have one more slot as shell/skin slot where you can insert 3d printed block there and it would assemble the robot with based on the shape of the 3d print blocks along with its parts.

    I do belive this is a great idea! But what if the person making the robot decides to be "smart" and make a 1x1x1 Robot that is unrealistic? How will it render tools? How will it render parts that it has installed? Besides a couple flaws this idea would be great to add.

    (With drones this might not be a good idea at all, because they are entities)

  5. Thats because the computer then switches to a different screen. So lets say screen #1 is the screen you want to use. When you boot the computer it chooses a random screen to use. Then after it gets past "Initializing components" it picks a new screen called screen #2 or something else. When you break the cable the computer sees that it only has on screen to use so it gos back to that one. In order to have it work correctly on the screen you have to force the computer to bind to screen #1.

  6. The Robot cant interact with "external devices" so your best bet with Opencomputers would be have one or two computers that read the Redstone signal then send it over a wireless network card then received by the Robot.

  7. bind(address: string): boolean[, string]
    Tries to bind the GPU to a screen with the specified address. Returns true on success, false and an error message on failure.
    A GPU can only be bound to one screen at a time. All operations on it will work on the bound screen. If you wish to control multiple screens at once, you'll need to put more than one graphics card into your computer.
    

    That was taking right from the wiki.

     Type that into a lua prompt or make an autorun command for it.

  8. OC Only has one type of cable available. In real life there is different cable types and uses.

    My Ideas are.

     

    Cheap Cable

     Transports power at lower rate. (Like IC2s copper or tin cable)

     Sends messages at about 1 Block per Tick

     

    Gold Cable

     Transports power at a high rate.

     Sends messages at about 2 Blocks per Tick

     

    Fiber Cable

     Transports no power.

     Sends messages instantly like current cables.

     

    To work around have slow screen update speeds from slow cable make putting the blocks together act like fiber Cable.

     

    Or have Cable like CAT5e or CAT6 or even some scuzzy cables.

  9. Im guessing that you did not make this yourself?

    If you just need a simple program to make it go on when power is low and off when power is high (It does not waste Yellorite) then I have a program for you. (Also smaller so with some studying it might help you get a better grip on lua.)

    As for the error, I need to get a copy of the error, and its easier to make your own program most of the time. Thats why I made mine.

  10. If you ask me, writing to an EEPROM chip is not that hard:

    • Write your BIOS in Lua
    • Stick an empty EEPROM chip into your computer
    • Run flash yourbioscode.lua
    • Take out your EEPROM (and put the old one back in, otherwise your dev computer won't start)

    Or if you want to do it from Lua:

    local component = require("component")
    component.eeprom.set("-- your BIOS code here")
    

    Writing data to an EEPROM is not hard, it's writing a program in only 4 KB with only basic APIs that's difficult. The reason for that is that you're not programming an Arduino, you're programming a computer on its lowest level. I don't know Arduino much, but I assume that you can write Arduino programs with more high-level and easy-to-use libraries than a BIOS.

    Thank you. Now it looks like something a ten year old can do. (Not joking nor being Sarcastic) But it should be easily done with something like

     

    1. Make special X Block and put EEPROM Into it

    2. Enter something like "edit (EEPROM Add)"

    3. Enter code then remove EEPROM

     

    With Arduino the coding is "simple" much like OpenComputers. Snippet of Arduino code

    int hour11 = 1;
    int hour21 = 2;
    int hour22 = 3;
    int hour23 = 4;
    int hour24 = 5;
    int minute11 = 6;
    int minute12 = 7;
    int minute13 = 8;
    int minute21 = 9;
    int minute22 = 10;
    int minute23 = 11;
    int minute24 = 12;
        int hour1 =  0;
        int hour2 = 0;
        int minute1 = 0;
        int minute2 = 0;
            int addmin = 0;
            int addhour = 13;
    void setup() {
      pinMode(hour11, OUTPUT);
      pinMode(hour21, OUTPUT);
      pinMode(hour22, OUTPUT);
      pinMode(hour23, OUTPUT);
      pinMode(hour24, OUTPUT);
      pinMode(minute11, OUTPUT);
      pinMode(minute12, OUTPUT);
      pinMode(minute13, OUTPUT);
      pinMode(minute21, OUTPUT);
      pinMode(minute22, OUTPUT);
      pinMode(minute23, OUTPUT);
      pinMode(minute24, OUTPUT);
      pinMode(addmin, INPUT);
      pinMode(addhour, INPUT);
    }
    
    void loop() {
      delay(60000);
      minute2 = minute2 + 1;
      if (minute2 = 10){
        minute1 = minute1 + 1;
        minute2 = 0;
      }
        if (minute1 = 6){
          hour2 = hour2 + 1;
          minute1 = 0;
        }
          if (hour2 = 10){
            hour1 = hour1 + 1;
            hour2 = 0;
          }
          if (hour2 = 2){
            if (hour1 = 1){
              hour1 = 0;
              hour2 = 0;
            }
          }
    
    

    (Sorry Admins if this is too long)

    (Think of pinmode as Redstone IO)

    You can see its similar to OpenComputers, but instead of

     if (hour2 = 2){
       if (hour1 = 1){
         hour1 = 0;
         hour2 = 0;
       }
     }
    

    You would have

     if hour2 == 2
       if hour1 == 1
         hour1 = 0
         hour2 = 0
       end
     end
    

    Also the main reason why I wanted to do this to program a Microcontroller is to have a big reactor control program.

    (Again sorry admins if this is too long. Delete it or let me know to shorten this.)

  11. Microcontrollers are not meant to be easy. As for blocks for reading them, I think Computronics might add one (don't quote me on that, I'm not 100% sure). They can be read the same way they're written to (i think the flash program has arguments for reading from the EEPROM to a file) by putting it in a computer case.

    I did not mean Microcontrollers are harder then they should I mean programming the EEPROM is too hard. In real life Microcontrollers are easy (At least for me besides the pesky soldering) to use and upload info too. When I decide to write a code for Arduino I just plug it in using a simple USB cable then open the programming application for it and write.

     

    As for what Kevink525 Said That "Reading of course is kind of impossible." its not. I mean it "kind" of is but with some good logic and some setup you can find the code or reverse engineer it. Writing to the EEPROM should be easy but Reading it should be difficult if at all possible.

  12. EEPROMs can store 4096 bytes of code (dependant on the architecture of the CPU in the computer) and can be written to by utilising the "flash" program in OpenOS (not sure if other OS' have flash programs). once you have booted the computer to OpenOS you can remove the Lua BIOS EEPROM and put in a blank one ready for writing to.

     

    You will need to keep the EEPROM in some sort of loop because if the program exits/finishes then it will turn off.

    http://ocdoc.cil.li/tutorial:custom_oses may also be of use to know what is available to the controller.

    That seams more difficult then it should be. Is there any plans to make it act like a floppy in a block that reads it?

  13. I'm trying to get a little program set up to out the cords of the screen pixels when I click them. I looked around but still could not find one. One that I did find on Open-computers forum did not work. Here is my code.

    function touchsig(_, x, y, _, _)
      print("Xcord: " .. x .. "Ycord: " .. y)
    end
    while true do
      event.listen("touch", touchsig)
    end
    

    Whenever I run it I get.

    /cords:5: attempt to index global 'event' (a nil value)
    stack traceback:\
            /cords:5: in main chunk
            (...tail calls...)
    

    Any Ideas on how to fix this?

     

    Also off topic but I'm doing this because I want to make a "spiffy" Big Reactors controller. Should I use OpenComputers like I planned or just settle with the OP Computercraft?

×
×
  • Create New...

Important Information

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