else if analogReadA0 250 ICR1 685 xxx analogReadA0 xxx xxx ICR1 xxx xxx 1023

Else if analogreada0 250 icr1 685 xxx analogreada0

This preview shows page 47 - 55 out of 55 pages.

else if (analogRead(A0)< 250) { ICR1 = 685; xxx = analogRead(A0); xxx = xxx * ICR1; xxx = xxx / 1023; OCR1A = int(xxx); digitalWrite(8,HIGH); digitalWrite(7,LOW); digitalWrite(6,LOW); lcd.clear(); //lcd.setCursor(1,1); lcd.print("weevil"); delay(10); } else if (analogRead(A0)< 300) { ICR1 = 532; xxx = analogRead(A0); FINAL THESIS REPORT
Image of page 47
xxx = xxx * ICR1; xxx = xxx / 1023; OCR1A = int(xxx); digitalWrite(8,HIGH); digitalWrite(7,LOW); digitalWrite(6,LOW); lcd.clear(); //lcd.setCursor(1,1); lcd.print("weevil"); delay(10); } else if (analogRead(A0) <350) { ICR1 = 456; xxx = analogRead(A0); xxx = xxx * ICR1; xxx = xxx / 1023; OCR1A = int(xxx); digitalWrite(6,LOW); digitalWrite(8,LOW); digitalWrite(7,HIGH); lcd.clear(); //lcd.setCursor(1,1); lcd.print("termite"); delay(10); //lcd.setCursor(1,1); //lcd.print("termite"); delay(10); } else if (analogRead(A0) <400) { ICR1 = 312; FINAL THESIS REPORT
Image of page 48
xxx = analogRead(A0); xxx = xxx * ICR1; xxx = xxx / 1023; OCR1A = int(xxx); digitalWrite(6,LOW); digitalWrite(8,LOW); digitalWrite(7,HIGH); lcd.clear(); //lcd.setCursor(1,1); lcd.print("termite"); delay(10); //lcd.setCursor(1,1); //lcd.print("termite"); delay(10); } else if (analogRead(A0)< 450) { ICR1 = 399; xxx = analogRead(A0); xxx = xxx * ICR1; xxx = xxx / 1023; OCR1A = int(xxx); digitalWrite(6,LOW); digitalWrite(8,LOW); digitalWrite(7,HIGH); lcd.clear(); //lcd.setCursor(1,1); lcd.print("termite"); delay(10); //lcd.setCursor(2,1); //lcd.print("termite"); delay(10); FINAL THESIS REPORT
Image of page 49
} else if (analogRead(A0) <500) { ICR1 = 370; xxx = analogRead(A0); xxx = xxx * ICR1; xxx = xxx / 1023; OCR1A = int(xxx); digitalWrite(6,LOW); digitalWrite(8,LOW); digitalWrite(7,HIGH); lcd.clear(); //lcd.setCursor(1,1); lcd.print("termite"); delay(10); //lcd.setCursor(2,1); //lcd.print("termite"); delay(10); } else if (analogRead(A0) <550) { ICR1 = 354; xxx = analogRead(A0); xxx = xxx * ICR1; xxx = xxx / 1023; OCR1A = int(xxx); digitalWrite(6,LOW); digitalWrite(8,LOW); digitalWrite(7,HIGH); lcd.clear(); //lcd.cursor(); //lcd.setCursor(1,1); FINAL THESIS REPORT
Image of page 50
lcd.print("termite"); delay(10); //lcd.cursor(); //lcd.setCursor(2,1); //lcd.print("termite"); delay(10); } else if (analogRead(A0) <600) { ICR1 = 319; xxx = analogRead(A0); xxx = xxx * ICR1; xxx = xxx / 1023; OCR1A = int(xxx); digitalWrite(6,LOW); digitalWrite(8,LOW); digitalWrite(7,HIGH); lcd.clear(); //lcd.setCursor(1,1); lcd.print("termite"); delay(10); //lcd.setCursor(2,1); //lcd.print("termite"); delay(10); } else if (analogRead(A0) <650) { ICR1 = 289; xxx = analogRead(A0); xxx = xxx * ICR1; xxx = xxx / 1023; OCR1A = int(xxx); FINAL THESIS REPORT
Image of page 51
digitalWrite(8,LOW); digitalWrite(7,LOW); digitalWrite(6,HIGH); lcd.clear(); //lcd.setCursor(1,1); lcd.print("locust"); delay(10); } else if (analogRead(A0) <700) { ICR1 = 277; xxx = analogRead(A0); xxx = xxx * ICR1; xxx = xxx / 1023; OCR1A = int(xxx); digitalWrite(8,LOW); digitalWrite(7,LOW); digitalWrite(6,HIGH); lcd.clear(); //lcd.setCursor(1,1); lcd.print("locust"); delay(10); } else if (analogRead(A0) <750) { ICR1 = 265; xxx = analogRead(A0); xxx = xxx * ICR1; xxx = xxx / 1023; OCR1A = int(xxx); digitalWrite(8,LOW); digitalWrite(7,LOW) FINAL THESIS REPORT
Image of page 52
digitalWrite(6,HIGH); lcd.clear(); //lcd.setCursor(1,1); lcd.print("locust"); delay(10); } else if (analogRead(A0) <800) { ICR1 = 245; xxx = analogRead(A0); xxx = xxx * ICR1; xxx = xxx / 1023; OCR1A = int(xxx); digitalWrite(8,LOW); digitalWrite(7,LOW); digitalWrite(6,HIGH); lcd.clear(); //lcd.setCursor(1,1); lcd.print("rat and grasshopper"); delay(10); } else if (analogRead(A0) <850) { ICR1 = 238; xxx = analogRead(A0); xxx = xxx * ICR1; xxx = xxx / 1023; OCR1A = int(xxx); digitalWrite(8,LOW); digitalWrite(7,LOW); digitalWrite(6,HIGH); lcd.clear(); FINAL THESIS REPORT
Image of page 53
//lcd.setCursor(1,1); lcd.print("rat and grasshopper"); delay(10); } else if (analogRead(A0) <900) { ICR1 = 227; xxx = analogRead(A0);
Image of page 54
Image of page 55

You've reached the end of your free preview.

Want to read all 55 pages?

  • Fall '19

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture

  • Left Quote Icon

    Student Picture