Made a very simple program for computers to detect redstone input/outputs. Did a search with google but i couldn't find anything and the redstone api does not provide any and all the functions take a side string as input.


for _, sSide in pairs( redstone.getSides( ) ) do
  redstone.setOutput( sSide, true )
  redstone.setBundledOutput( sSide, 0xFFFF )
  sleep( 0.05 )
  if redstone.getInput( sSide ) then
	print( "detected redstone on " .. sSide )
  elseif redstone.getBundledInput( sSide ) ~= 0 then
	print( "detected bundled redstone on " .. sSide )
  end
  redstone.setOutput( sSide, false )
  redstone.setBundledOutput( sSide, 0x0 )
end

This function works because an output signal redirects to an input if the side has a redstone connection.

tested on CC 1.75 MC 1.7.10