66 posts
Posted 24 July 2012 - 07:27 AM
Hello i would like to make it so when i pushed the button for the white wire it would beable to send it to the computer and when i pushed it it would run a program i made called "white cable". and when i push the button for the orange cable it would run a program called "orange cable".
36 posts
Posted 24 July 2012 - 07:31 AM
According to the wiki page for redstone (
http://computercraft.info/wiki/index.php?title=Redstone_%28API%29) You can use
rs.getBundledInput(
string side). This is how to test if a color is on:
print (colors.test (redstone.getBundledInput("back"), colors.blue))
Good luck!
864 posts
Location
Sometime.
Posted 24 July 2012 - 08:50 AM
if colors.test( rs.getBundledInput("back"), colors.white ) then
print("White")
elseif colors.test( rs.getBundledInput("back"), colors.orange ) then
print("Orange")
elseif colors.test( rs.getBundledInput("back"), colors.magenta ) then
print("Magenta")
end
-- IDK if this works, I never really used the colors/rs api.