Wiki 9Minecraft Wiki 9Minecraft

OpenComputers Mechanics and Programming

Guides 2FAQ 10Related mods 60
DownloadOpenComputers Mod

Get the files on 9Minecraft

Contents (5)
  1. OpenOS
  2. The Component API
  3. Persistence (Eris)
  4. Next guides
  5. More in this wiki

OpenOS

OpenOS is the primary operating system for OpenComputers. It provides a command-line interface (CLI) similar to Unix/Linux. Users can create, edit, and run scripts using the built-in edit command.

The Component API

In Lua, the computer interacts with its hardware via the component library. Example of turning on a redstone signal:

local component = require("component")
local rs = component.redstone
rs.setOutput(5, 15) -- Sets redstone output on the back side to max strength

Persistence (Eris)

OpenComputers uses the Eris library to serialize the state of the Lua VM. This means that if a computer is running a complex script and the chunk unloads, the script will be exactly where it left off when the chunk reloads. This eliminates the need for complex 'startup' scripts for every minor task.