- Sky
- Blueberry
- Slate
- Blackcurrant
- Watermelon
- Strawberry
- Orange
- Banana
- Apple
- Emerald
- Chocolate
- Charcoal
-
Content Count
451 -
Joined
-
Last visited
-
Days Won
35
Everything posted by Molinko
-
edit geo2holo.lua use arrow keys to navigate to line 29 type the magic words component.hologram.setScale(3) ctrl+s to save and ctrl+w to close the edit program. ...profit???
-
You put component.hologram.setScale(3) online 29.... Then you run it... Then...??? Profit...???
-
projector.setScale(value:number) Set the render scale. A larger scale consumes more energy. The minimum scale is 0.33, where the hologram will fit in a single block space, the maximum scale is 3, where the hologram will take up a 9x6x9 block space.
-
To answer you first question We have to understand that messages in OpenComputers are only the basic types: strings, numbers, booleans, and NOT tables and/or functions. This means that in order to have a robot take "commands" from another computer it has to have a special program that waits for special, known commands (a protocol) and executes either a simple command or maybe a more complex command like running another program from the filesystem and awaiting another command after it has finished the program. Here we'll make 2 very basic programs to do simple control of a robot.
-
Check out THIS post I answered before. A drone is exactly the same as a micro controller, with regards to the Lua environment, but with exposure to the drone 'component'.
-
I'm at work so I cant give details right now but I would highly suggest you look at the "types" of values you can use to program, such as booleans or strings. These are paramount to the basics of programming and understanding documentation so you can help yourself better.
-
Your robot will need an inventory_controller upgrade to pull items from specific slots in a chest. local component = require "component" local ic = component.inventory_controller ic.suckFromSlot(side:number, slot:number, [count:number])-- 3, 2, 10 -- take (10) items from slot (2) in front (3) of the robot. sides.front == 3 suckFromSlot(side:number, slot:number[, count:number]):booleanTakes up to count items from the specified slot of the inventory at the specified side and puts them into the currently selected slot.side - a valid side.slot - the slot to take the item from.count - how m
-
Official OpenComputers Documentation
-
Sorry about that. My example used gpu.fill wrong.. It should be.. gpu.fill(1, 1, 10, 10, " ") That last arg should be the char to use not the color to fill with. Color is obviously set with gpu.setBackground.
-
local colors = require "colors" local component = require "component" local gpu = component.gpu gpu.setForeground(colors.gray) gpu.setBackground(colors.orange) gpu.fill(1, 1, 10, 10, colors.white) Same flavors, different brand. gpu component documentation
-
What "stuff" is available on a Microcontroller?
Molinko replied to DonArmadillo's question in Programming
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. -
You must have a cable connecting all screens to a computer or server. Also, OpenOS has a small issue when booting with multiple screens, it can't seem to decide which one is the main one all the time. You will also need to write code that will draw to each screen. Hope this helps
-
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,
-
Wasn't sure where or if I can get some TIS-3D help on these forums?? I'm pretty new to actually working with binary and hex and could use some help understanding the Bundled redstone modules specification. From what I gather the high byte is the channel to write to and the low byte is the value to be written. The exception being writing 0xFF as the high byte for setting the 'active' channel and the low byte being the channel to set. So... Ill try to describe my issue. stack - exec | bRedstone (stack on the left, exec module right of stack, bun
-
I just woke up... No problemo
- 13 replies
-
- coroutine
- coroutines
- (and 6 more)
-
I wanted to fix a small thing. Before, your program would tick every second with event.pull(1, "key_up"), currently with the code i suggested it will not. try this edit for one that update the batbox info every second.. local function main() local time = 0 local info = [[ CESU Power Levels and Controls Energy Stored : %s CESU Capacity : %s Press Enter to toggle reactor. Press Back to return to OpenOS. ]] while true do term.setCursor(1, 1) print( info:format(batbox.getStored(), batbox.getCapacity()) ) local e = table.pack(event.pull(1)) -- # resum
- 13 replies
-
- coroutine
- coroutines
- (and 6 more)
-
Apparently Ctrl-C is a soft interrupt and must be pulled specifically. Also I fucked up the draw order in the first example, because of no testing....
- 13 replies
-
- coroutine
- coroutines
- (and 6 more)
-
Sorry for the delay... Yeah, my first example was shit.. Im sorry for that. I've made another (tested) version. local component = require("component") local term = require("term") local side = require("sides") local keyboard = require("keyboard") local event = require("event") local rs = component.redstone local batbox = component.cesu local board = component.keyboard function toggleBox() -- # this was wonky aswell i think. rs usually goes 0 - 15 or maybe RP channels 0 - 255 ?? if rs.getOutput(side.left) > 0 then rs.setOutput(side.left, 0) else rs.setOutput(si
- 13 replies
-
- coroutine
- coroutines
- (and 6 more)
-
From what I can see, when the backspace is hit the program should just end (i.e breaking or ending the 'main loop'). The enter key should update the state of the box or (toggle it :p). The loop i made from your code will 1. draw the screen for initialization. 2. wait 1 second and refresh or receive a key up event. 3. depending on the event, toggleBox or set running to false. 4. in the until clause we check if the event was a terminated event (if the user pressed ctrl+C) to terminate the program. Either 'back' or the terminate event will break the loop and leave the main function thus endi
- 13 replies
-
- coroutine
- coroutines
- (and 6 more)