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

OpenSecurity: os_alarm not found

Question

I'm trying to get an alarm system to work, but when I try this code I'm getting an error that os_alarm does not exist in /boot/04_component.lua

local component = require("component")
local sides = require("sides")
rs = component.redstone
alarm = component.os_alarm
yes = true

while yes do
	if rs.getInput(sides.south)>0 then
		alarm.setAlarm("klaxon2")
		alarm.setRange(1-60)
		alarm.activate()
	else
		alarm.setAlarm("klaxon2")
		alarm.setRange(1-60)
		alarm.deactivate()
	end
end

 

Link to post
Share on other sites

6 answers to this question

Recommended Posts

  • 0

There are none within the mod, but you can do that with OC but it requires knowledge about how things work.

you could use network messages to send a command to the computer which the alarm is connected to. Or (which is more complicated) assemble a Microcontroller with the Alarm inside, which does listen for the network message.

How to use network messages can be read up here: https://ocdoc.cil.li/component:modem

You should start with 2 computers which have a wireless network card, and when you got that running you could look into microcontrollers.

Link to post
Share on other sites
  • 0
16 hours ago, ben_mkiv said:

There are none within the mod, but you can do that with OC but it requires knowledge about how things work.

you could use network messages to send a command to the computer which the alarm is connected to. Or (which is more complicated) assemble a Microcontroller with the Alarm inside, which does listen for the network message.

How to use network messages can be read up here: https://ocdoc.cil.li/component:modem

You should start with 2 computers which have a wireless network card, and when you got that running you could look into microcontrollers.

Yeah, I was already thinking about those two things. But thanks for helping me.

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
Answer this question...

×   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.