if((channelNum+1) * val[channelNum] == channelNum+1){
Serial.print(((64+(channelNum+1))),BYTE);
Serial.print("\t");
//switch on
}
if( (channelNum+1) + val[channelNum] == channelNum+1){
Serial.print((channelNum+1),BYTE);
Serial.print("\t");
//switch off
So if switches are on, an arduino will send switch number(1-64) and if they are off , it will send switch number+64 to processing. Finally, processing could get unique values accoding to the switch's status so it could trigger unique images.


















