• Sky
  • Blueberry
  • Slate
  • Blackcurrant
  • Watermelon
  • Strawberry
  • Orange
  • Banana
  • Apple
  • Emerald
  • Chocolate
  • Charcoal
Welcome to OpenComputers

Register now to gain access to all of our features. Once registered and logged in, you will be able to contribute to this site by submitting your own content or replying to existing content. You'll be able to customize your profile, receive reputation points as a reward for submitting content, while also communicating with other members via your own private inbox, plus much more!

This message will be removed once you have signed in.

  • Announcements

    • Lizzy Trickster

      Latest Stable OpenComputers Version   11/26/16

      The latest released version of OpenComputers is version 1.6.1 for MC 1.7.10, 1.8.9, 1.9.4 & 1.10.2. See more information here! Beta/Dev builds can be found at the Jenkins Build Server (ci.cil.li)

Leaderboard


Popular Content

Showing content with the highest reputation since 04/29/17 in all areas

  1. 3 points
    TwoThe

    Clock - displays ingame time

    On my way to learn OC I decided to write a simple clock program that displays the current ingame time on the screen. You can download it from pastebin: 29GbdXf4 If you run it, the resolution will be reduced so the time is displayed as big as possible when watching the screen block. If you press space the program is terminated (and the resolution reset). Also works as tutorial on events.
  2. 2 points
    Sangar

    Website tagged on webfilter

    Filed a request.
  3. 1 point
    Molinko

    What "stuff" is available on a Microcontroller?

    Check out THIS. Everything under "What's available" is.... available to a microcontroller. It's basically the default lua environment plus the computer, component, and the unicode library. Also be aware that OpenOS appends to those default libraries so not all of what your used to in say the component library is available. i.e no component.isAvailable or component.get.
  4. 1 point
    Log

    Clock - displays ingame time

    I make is with pseudographics pastebin get wA3Nz2YC clock.lua
  5. 1 point
    The controller is working as intended for you. On default settings the containment field stabilizes around 20%. I WILL make a youtube video because many ppl have trouble setting it up correctly it seems. Anyways - your setup seems to work fine. Do NOT worry about the temperature as long as it is not above 9000. The default settings are going to throttle the reactors output between 8000 -> 9000 C (= it's adjusting the target saturation from 50% to 90%) between 9000 and 9900 the output rate will be reduced from 100% to 0%. Anything above 9900 will trigger an immediate shutdown (although it should do so before that point is reached). Do NOT worry about the containment field unless it either starts dropping rapidly when it's well below 20% on default settings or it gets lower than 8% (which should NEVER EVER happen on default). Anything above 0 is perfectly fine. Why is the controller keeping the containment field low? To keep the containment field at higher levels, you're required to pump in more RF per tick. But since anything above 0% is fine, we can save a lot of energy by having the containment field low. How much energy you ask? Keeping the containment field at 50% cost 50% more energy than keeping it at 25%. 25% costs 16% more energy than 12.5%. You might've guessed it: The formular is: <somevalue> / (1 - field_percent). If you go to the preset page and use my special settings, the containment will go to roughly 9.09%, dropping somewhere to 8.xx% if you cut the load and suddenly put load on it again. I'm running these settings on a server on...like...11 (?) reactors now. Do not worry! If your reactor is setup correctly, it is extremely hard to make it explode by accident. I blew up 4 reactors on my server: 3 blew up simultaineously because of dimension loading issues (do not put your reactor in a different dimension than your energy storage. Do NOT do it!) 1 blew up because I accidentally put a flux point directly on a stabilizer - with unlimited throughput. INSTA FIREWORKS! I've really tried everything (= could occur during normal operation) to blow them up - including cutting the load and reapplying it when the reactors were nearing their shutdown sequence (which is the most dangerous stage). Everything is still running. Last but not least some explaination: The jump in the containment field you see is because the controller did not yet run again and reset the feedback gate yet. It's still running at 1M rf/t for a few ticks, thus the surge in containment field strength you saw. Actually "running" the reactor at 2000 is propably impossible. I acidentally cut the load to one of the reactors entirely so it went to 100%ish saturation with 0rf/t output - and temps did not go below 2150 C (at ~11% fuel conversion). EDIT: Fixed my math (facepalm)
  6. 1 point
    Dustpuppy

    My gui

    I've updated the pastebin download.
  7. 1 point
    Aether

    Simple Redstone Control Example

    local component = require("component") local upright = component.proxy("ced03056-f8ea-432b-94c0-a89b9d1b3336")--Change the addresses to match with your Redstone I/O's local upleft = component.proxy("182fc96d-d245-4bed-a69c-71469b286418")-- local downright = component.proxy("3d65cc84-e08d-4d32-9c65-b9c9aba60a18") local downleft = component.proxy("fc7ebe48-702b-4e1e-9911-5c09c602588c") local downright2= component.proxy("1a760530-540e-438a-8cc5-803c75a5767e") local downleft2= component.proxy("9de1f13e-4347-408a-bb0a-46f7b2241a15") function close() downleft.setOutput(1,15) downleft.setOutput(3,15) downright.setOutput(1,15) downright.setOutput(3,15) os.sleep(2) upleft.setOutput(5,15) upright.setOutput(4,15) end function open() upleft.setOutput(5,0) upright.setOutput(4,0) os.sleep(2) downleft.setOutput(3,0) downleft.setOutput(1,0) downright.setOutput(3,0) downright.setOutput(1,0) os.sleep(2) downleft2.setOutput(4,15) downright2.setOutput(5,15) downleft2.setOutput(4,0) downright2.setOutput(5,0) end Let me know what do you think about it I just started learning lua like four days ago when I discovered this mod. I know a bit of C and C++. I've been able to do amazing this and I just fall in love with this mod.
  8. 1 point
    Memelord420

    Modem receive question

    So, basically what I want to do is make it so that a computer waits for a message to be sent to it, but doesn't get stuck forever waiting for a response. For example, I'd have a computer send a request for data to another computer that's constantly receiving, but the computer that requested the data only listens for responses for 2 seconds, and if it doesn't get anything sent to it, it would result to a default value.
  9. 1 point
    Molinko

    Modem receive question

    local component = require "component" local modem = component.modem -- # our majestic default... local default_value = 42 -- # dont forget to open our ports... modem.open(12345) -- # response is a table of either nothing after two seconds, or a modem message. local response = table.pack(event.pull(2, "modem_message")) -- # wait 2 seconds for a modem message event -- # Done waiting.. If we got a message, assign the first user sent parameter to it. This is always a string! if response[1] == "modem_message" and response[5] ~= nil then default_value = response[5] -- # The fifth, or greater, parameters hold user set values end Hope this is clear enough to get you started
  10. 1 point
    Fingercomp

    Computronics particle card trouble

    That's because you're missing " before and after the string. Instead of just minecraft:barrier, you need to use "minecraft:barrier". Also I'm pretty sure you don't need that minecraft: at the start of the particle name. component.particle.spawn("barrier", 1, 1, 1)
  11. 1 point
    Log

    Undocumented parameters on Geolyzer

    Each scan is made over 0.05 seconds. The maximum number of blocks which can be scanned at one time - 64 The available area for scanning is 65x64x65 65*65*0.05=211.25 sec Hence, the entire available area possible to scan for 3.5 minutes. Increase the speed only can increasing the number of computers and geolyzers.
  12. 1 point
    BrisingrAerowing

    ComputerCraft emulator

    You might want to recheck the spelling of your title.
  13. 1 point
    You're very welcome . If you find the opencomputers config settings and change 'bufferChanges=true' to 'bufferChanges=false', you won't have to close minecraft every time you want to access a computers filesystem outside of MC.
  14. 1 point
    BrisingrAerowing

    Proximity Door Daemon

    This program is a service/daemon that automatically opens doors based on input from motion sensors. Features: Any arbitrary number of doors, each with its own configuration Events on entity allowed/denied Logging of access attempts Plugin support Installation: wget -f https://github.com/BrisingrAerowing/OC-Programs/raw/master/gryphonlib/gryphonlib.lua /lib/gryphonlib.lua wget -f https://github.com/BrisingrAerowing/OC-Programs/raw/master/inifile/inifile.lua /lib/inifile.lua mkdir /etc/proxdoor.d wget -f https://github.com/BrisingrAerowing/OC-Programs/raw/master/proxdoord/proxdoord.lua /etc/rc.d/proxdoord.lua wget -f https://github.com/BrisingrAerowing/OC-Programs/raw/master/proxdoord/proxdoor.cfg /etc/proxdoor.cfg wget -f https://github.com/BrisingrAerowing/OC-Programs/raw/master/proxdoord/proxdoor.d/example.cfg.noload /etc/proxdoor.d/example.config.noload mkdir /lib/proxdoor/plugins wget -f https://github.com/BrisingrAerowing/OC-Programs/raw/master/proxdoord/plugins/example_plugin.lua /lib/proxdoor/plugins/example_plugin.lua The last two files are an example door configuration and an example plugin. Configuration file outline: Main Configuration File: [general] config_dir = /etc/proxdoor.d # Door Configuration Directory plugin_dir = /lib/proxdoor/plugins # Plugin directory event_on_entity_denied = true # Fire an event (proxdoor_access) on denying an entity event_on_entity_allowed = true # Fire an event (proxdoor_access) on allowing an entity [logging] log_file_path = /var/log/proxdoord # The directory log files are written to general_log_file_name = general.log # The name of the general log file (Initialization stuff) general_log_enabled = true # Whether the general log is enabled access_log_file_name = access.log # The name of the access log file (access attempts) access_log_enabled = true # Whether the access log is enabled Door Configuration File: [general] name = Proxdoor 1 # The name of the door. Used to identity it in events and access logs range = 3 # The range used to detect entities side = top # The side to output the redstone on open_time = 3 # The time (in seconds) the door stays open inverted = false # Whether to initially power the redstone [addresses] motion_sensor = # The address of the motion sensor for this door. Required. redstone = # The address for the redstone IO for this door. Required. [users] user_list = # A space-separated list of entity names is_blacklist = false # Whether the above list is a blacklist allow_all = false # Whether to allow all entities. Overrides the above user configuration. The configuration files MUST have the extension .cfg, otherwise they won't be loaded. Changelog: 1/11/2017 Added plugin support
  15. 1 point
    OCMIPS is a mod for OpenComputers which adds a MIPS-I architecture core. Status: - The CPU itself is mostly complete. - It's sorely lacking in software, although Lua 5.3.2 runs (or at least used to). - It's got an ELF bootloader EEPROM. - I used to be able to boot Lua off a T1 (192KB) stick of RAM when run atop Mocha + libgreen, but I accidentally broke stuff so I still need to fix that. - The component API currently sucks. Here's a proposal that should help make it suck less for some components. OCMIPS source: https://github.com/iamgreaser/ocmips If you want binaries, lurk on #oc and I spit them out from time to time, although this old one might work (link is for a 1.7.10 version; github should have 1.9 stuff). For building a cross compiler, I use binutils + gcc + newlib. Feed "--target=mipsel-none-elf" into the configure scripts. When building gcc, use "make all-gcc" and "sudo make install-gcc" for the first stage, build newlib, and then continue with "make all" and "sudo make install". "--enable-languages=c,c++" should work fine. Fortran support needs to be whacked with a hammer initially so you may want to skip that unless you really need it. Other langs not tested. Latest screenshot: Cache works! Mod Edit: Pinned ~ Liz
  16. 1 point
    mpmxyz

    mpm.rstools: Simplify your redstone!

    Introduction Are you creating the secret underground base? A pyramid maze with all kinds of traps? Or just your high security door lock? Then it's very likely that you are using redstone. More complex designs require bigger circuits or computers. (redstone computers?) Programming with redstone cards or blocks is quite straightforward, but it can be quite annoying to always repeat yourself: local component = require("component") local sides = require("sides") local colors = require("colors") local rs = component.redstone rs.setBundledOutput(sides.north, colors.blue, true) --close entrance os.sleep(1) rs.setBundledOutput(sides.north, colors.green, false) --open exit os.sleep(10) rs.setBundledOutput(sides.north, colors.green, true) --close exit os.sleep(1) rs.setBundledOutput(sides.north, colors.blue, false) --open entrance This library makes things easier and your code more expressive: local component = require("component") local rstools = require("mpm.rstools") local rs = component.redstone --inverted to make true == open local entrance = rstools.digital("output", rs, "north", "blue").inverted local exit = rstools.digital("output", rs, "north", "green").inverted entrance(false) --close entrance os.sleep(1) exit:pulse(10, true, false) --open exit for 10 seconds os.sleep(1) entrance(true) --open entrance Documentation Depencencies Software OpenOS Hardware Redstone Component Installation Download the file and save it as the library "mpm.rstools". Download (last update: 29.01.16) github mkdir /home/lib/mpm cd /home/lib/mpm wget 'https://raw.githubusercontent.com/mpmxyz/ocprograms/master/home/lib/mpm/rstools.lua' Known Issues None.
  17. 1 point
    Molinko

    (Proof of concept) Working/toggleable button

    Aha. I see you're hard at work on your very own solution! Allow me to give a tip or 5 Today we'll talk a little about OOP or Object Oriented Programming. Now, in lua, OOP is a little different than in other more popular OOP languages such as JAVA. So for you guys out there who would say lua doesnt have oop... You probably know better than me. With that said lets learn some stuff about simulating OOP in lua. First off there are tables. myTable = {}. In lua tables are used as objects because every table created is unique. Not table references though. i.e. myTableA = myTable, this is referencing myTable. With this in mind we can create objects with behavior relevant to that object. Still following? Example: If you notice the Bob object has specific fields, name and age, that identify him. The fields arent so unique but the Bob object is. Bob isnt very flexible as an object though. This brings me to Classes. Classes are Objects. But, they are not the same as lets say Bob. Bob is an instance of a Class. We usually wont interact with a class like we would an instance of a class. For example: Now for my main point.. Buttons. Buttons are a class. We want uniqueness and specified behavior. I hope this will help you understand the power of OOP like design and some of the more basic ways to use it As usual any questions or elaborations by others are welcome. If someone else can explain better please do! lua is my first language!