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

    1. Announcements

      OpenComputers official announcements.

    2. Feedback

      Tell us what you think.

    3. IRC

      #OC channel discussion
      irc.esper.net #oc

  2. Code Central

    1. Support

      Ask for support from the OpenComputers community

    2. Showcase

      Showcase what you have created for OC. No 'malware' or other junk!

    3. Tutorials

      Help other users out. Please no 'false tutorials'

  3. Addons & More

    1. Addons Mods

      Show off your OC addons mods

    2. Architectures

      Discussions for Architectures

    3. OpenEngineering Task Force

      Discussion board for the OETF documents

  4. General

    1. Lounge

      Just lounge around or have an open discussion.

    2. Forum Games

      Fight boredom!

    3. Showcase

      Show off your creations! (not for your programs)

    4. Servers

      A place to advertise your servers

  5. Archives

    1. Public Archives

      OpenComputers public archive forum

  • Forum Upkeep

    In order to keep the forums updated with improvements and security fixes, we need to pay for a subscription.

    Currently, this is: $25/6-months for the forums itself and $10/6-months for the Theme (totalling $35 USD/6-months).

    You're not obligated to donate anything, but anything you do donate will be much appreciated. :)

    28% of donation goal reached.
    Donate Sidebar by DevFuse
  • Topics

  • Posts

    • First, use code blocks. Second, i fixed your errors and made a few improvements. This should do what you wanted, if not reply in this thread. local component = require("component") local sides = require("sides") local colors = require("colors") --Unused local event = require("event") local term = require("term") local redstone = component.redstone local firecount = 1 local run = true local function main() local input = redstone.getInput(sides.front) if (input == 10) then print("Redstone Lever ON") print("Firing Firework " .. firecount .. "!") firecount = firecount + 1 redstone.setOutput(sides.left, 15) os.sleep(1) redstone.setOutput(sides.left, 0) os.sleep(1) else print("Lever is OFF") os.sleep(1) end end --Exit the loop with 'q', better than using Ctrl+C local function stop(_, _, char) if (char == 81 or char == 113) then event.ignore("key_down", stop) run = false end end --Print the prompt for quit key and start listening for it print("press 'q' to exit") event.listen("key_down", stop) --Main loop, will run until 'run' is set to false while run do main() end --Clear the screen after the program ends term.clear()  
    • First, why are you sleeping after event.pull() , that's unneccesary and could cause issues where a event is missed. Second, how are the computers connected (picture), Are the computers separated by a swich, is there a loop where the swich receives a packet twice (This is the most likely reason for duplicating messages.)
    • First the opencomputers documentation:  http://ocdoc.cil.li local computer = require("computer") local component = require("component") local sides = require("sides") local rs = component.redstone local gpu = component.gpu --Desired time in seconds EDIT THIS!!! local timer_length = 10 --Clear the screen local w,h=gpu.getResolution() gpu.fill(1,1,w,h," ") local time_remaining --Get the current time and add desired countdown to it. local time_now = computer.uptime() local target_time = time_now + timer_length -- Function to draw remaining time on screen local function PrintTime(time) --Screen drawing logic in here! --Currently writes the reamining time on screen in seconds gpu.fill(1,1,w,1," ") gpu.set(1,1,"Time Remaining: " .. time) end --Loop until time is done while true do time_now = computer.uptime() time_remaining = target_time - time_now PrintTime(time_remaining) if(time_now>=target_time) then break end os.sleep(1) end -- Emit a redstone signal from the back of the computer with a sgnal strength of 15. rs.setOutput(sides.back,15) This should work, but i have not tested it.  It won't format the time in DD:HH:MM:SS (yet). It will howerver send the redstone signal when it hits 0 (in theory). Just reply in this thread if you need more help  or if it doesn't work.
    • @stealth95l The grid controller drains your energy storage until it's below 20% and then carges it until it's 95% full. It does so by tweaking energy production to be just shy of what you are actually consuming for discharging and just a bit more when charging. The assumption here is that for charging, less production is more efficient overall, and keeping your energy storage filled for longer improves responses to sudden power surges. Note that it will always drive your components at their peak efficiency, unless you have passive reactors in your system and are requesting more energy than you can efficiently produce. Meaning: Turbines will always run at peak efficiency or are halted. Reactors SHOULD always run at peak efficiency except when you just need more power.
    • No. It is not yet known what the post-1.12.2 future of OpenComputers will look like.
  • Popular Contributors

  • Create New...

Important Information

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