Posted 15 April 2012 - 09:59 AM
HI I'm having trouble with the following code http://pastebin.com/qHixyL8t .
What I'm trying to do is send a rednet message from another computer for example it could be any of these combinations seperated by comas
rednet.send(id, "right,back,left|red power color code") *color codes ranging from 1 trough 15 (white to red)
the first data sent before the "|" is to tell the computer which side to send the data after the "|".
once it has figured out which side it needs to send the signal it inputs the color code into the next free available space in the array.
it then loops trough and adds all the array up and outputs a bundled output signal now this works great…if you send it in order 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 fine great work, but if you send for instance this 4,7,11,15,1 then all will show up except one and the same with this sequence of numbers 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1 everything except the 1 will turn on.
would be great if someone could fix this and make it so that it will work no matter which combinations of colors are sent
What I'm trying to do is send a rednet message from another computer for example it could be any of these combinations seperated by comas
rednet.send(id, "right,back,left|red power color code") *color codes ranging from 1 trough 15 (white to red)
the first data sent before the "|" is to tell the computer which side to send the data after the "|".
once it has figured out which side it needs to send the signal it inputs the color code into the next free available space in the array.
it then loops trough and adds all the array up and outputs a bundled output signal now this works great…if you send it in order 1,2,3,4,5,6,7,8,9,10,11,12,13,14,15 fine great work, but if you send for instance this 4,7,11,15,1 then all will show up except one and the same with this sequence of numbers 15,14,13,12,11,10,9,8,7,6,5,4,3,2,1 everything except the 1 will turn on.
would be great if someone could fix this and make it so that it will work no matter which combinations of colors are sent