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

Microcontroller "Hello world"

Recommended Posts

While I was in boredom, I made a simple microcontroller program.

microcont.lua

local rs = component.proxy(component.list("redstone")())
while true do
  if rs.getInput(3) > 0 then
    computer.beep()
  end
  computer.pullSignal()
end

When the microcontroller receives a redstone signal from it's front, it beeps.

Took me some time to figure out how to make an actual program for microcontrollers that doesn't error out after a few seconds.

(also, this is my first topic!)

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...

Important Information

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