Please help support the site by donating at the link below.https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=8ZRU34U47BESW
int SY = A0;int RT = A3;int LED = 9;int cool = 0;bool active = false;bool oldOn = false;void setup() { pinMode(SY, INPUT); pinMode(RT, INPUT); pinMode(LED, OUTPUT); Serial.begin(9600);}void loop(){ int SYsig = analogRead(SY); Serial.println(SYsig); if (analogRead(SY) < 50 ) { if (oldOn == false) { if (active == false) { active = true; } else { active = false; } oldOn = true; delay(500); } } else { oldOn = false; } pinMode(RT, INPUT); int sig = analogRead(RT); if (active == true) { pinMode(RT, OUTPUT); analogWrite(RT, 1000); delay(22); pinMode(RT, INPUT); delay(100); } if (active == true) { int chicken = 4; } else if (active == false) { pinMode(RT, INPUT); } else if (sig > 150 || sig == 0 && active == false) { pinMode(RT, INPUT); }}