document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. int sensorPin = A0;
  2. int sensorValues = 0;
  3. const int POMPA=3;
  4.  
  5. void setup() {
  6. Serial.begin( 9600 );
  7. pinMode(sensorPin, INPUT);
  8. pinMode(POMPA, OUTPUT);
  9. }
  10.  
  11. void loop() {
  12. Serial.print("Valore: ");
  13. Serial.println (analogRead(A0));
  14. delay(500);
  15.  
  16. if (analogRead(A0)>100) {
  17. digitalWrite (POMPA, LOW);
  18. if (analogRead(A0)<700)
  19. digitalWrite(POMPA, HIGH);
  20. }
  21. }
');