rs.getInput( [side] )
where [side] is the side that the redstone is on.
EDIT: Here are some usage examples:
One off check to create a branch in code
if rs.getInput('left') then
print('There is a redstone signal on the left')
else
print('There is no redstone signal on the left')
end
Remember the state, but also print some stuff
local leftState = rs.getInput('left')
print('The redstone input on the left is '..(leftState and 'on.' or 'off.'))
Loop through all the sides and print the state
for _,side in pairs(rs.getSides()) do
print('The redstone input on the '..side..' is '..(rs.getInput(side) and 'on.' or 'off.'))
end
Edited by theoriginalbit, 09 May 2013 - 01:42 AM.