Code:int s0=3,s1=4,s2=5,s3=6;int out=2;int flag=0;byte counter=0;byte countR=0,countG=0,countB=0;void setup() { Serial.begin(115200); pinMode(s0,OUTPUT); pinMode(s1,OUTPUT); pinMode(s2,OUTPUT); pinMode(s3,OUTPUT); }void TCS() { flag=0; digitalWrite(s1,HIGH); digitalWrite(s0,HIGH); digitalWr...