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

Search the Community

Showing results for tags 'comparator'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • OpenComputers
    • Announcements
    • Feedback
    • IRC
  • Code Central
    • Support
    • Showcase
    • Tutorials
  • Addons & More
    • Addons Mods
    • Architectures
    • OpenEngineering Task Force
  • General
    • Lounge
    • Forum Games
    • Showcase
    • Servers
  • Archives
    • Public Archives

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


AIM


MSN


Website URL


ICQ


Yahoo


Jabber


Skype


Minecraft


GitHub


IRC


Fediverse ID


Location


Interests

Found 1 result

  1. local rs = component.proxy(component.list("redstone")()) local ceiling = 14 --/15 local floor = 1 local intervalSeconds = 10 local capSide = 4 -- http://ocdoc.cil.li/api:sides local rsLevel = 0 local capLevel = 0 function sleep(timeout) local deadline = computer.uptime() + (timeout or 0) repeat computer.pullSignal(0) until computer.uptime() >= deadline end while true do capLevel = rs.getComparatorInput(capSide) if capLevel >= ceiling then rsLevel = 1 elseif capLevel <= floor then rsLevel = 0 end rs.setOutput(capSide, rsLevel) -- debug stuff
×
×
  • Create New...

Important Information

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