Hi. I am new to OpenComputers and Lua. I have gotten comfortable with building computers and installing OpenComputers onto my hard drive.
Currently I have:
tier 3 case with:
tier 3 cpu
tier 3 hard drive
tier 2 hard drive
tier 3 memory x 2
tier 3 graphics card
tier 2 redstone card
I have a line of redstone coming off the right side of the cpu case if you are looking at it from the front, and the redstone goes to a Dispenser with fireworks in it.
I then have a line of redstone coming off the front side of the cpu case to a block of diamond with a lever on the front.
If I flip the lever a redstone signal runs to the cpu.
I can use redstone.getInput(front) to find out it is getting a value of 10.
I want to send a redstone signal out the side to the dispenser, then shut it off, check the front, if signal still at 10 then send another signal out the side.
so far here is my code:
local component = require("component")
local sides - require("sides")
local colors = require("colors")
local redstone = component.redstone
local function main()
local firecount =- 1
local signal =- redstone.getInput(front)
If signal == 10 then
print("Redstone Lever ON")
print("Firing FIrework!" firecount)
print("Lever is OFF")
while true do