 //#include "reg51.h"
 
 //#define PUMP_DIRECTION_PIN 2 //Waterpump direction, connected to B_IB pin on HG7881 (L9110) Dual Channel Motor Driver Module
-#define PUMP_PWM_PIN 2 //Waterpump speed, connected to B_IA pin on HG7881 (L9110) Dual Channel Motor Driver Module
+#define PUMP_A_PIN 2 //Waterpump speed, connected to B_IA pin on HG7881 (L9110) Dual Channel Motor Driver Module
+#define PUMP_B_PIN 3
 #define PWM_SLOW 50
 #define PWM_FAST 200 
 

#define WHITE           0xFFFF

#define VALUE_COUNT 24

TFTLCD tft(LCD_CS, LCD_CD, LCD_WR, LCD_RD, LCD_RESET); //TFT chip 7783
TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300);

  }
}

void updateAndDraw()
{
  Serial.println("Updating data and drawing screen.");
  //Read sensor data
  float soil_sensor = analogRead(SOIL_SENSOR_PIN);
  soilValues[counter] = int(soil_sensor);
  String soil_sensor_value = String(soil_sensor);  
    
  soil_sensor_value.toCharArray(soilSensorPrintout, 4);

  drawScreen();
}

void water()
{
  Serial.println("Watering...");
  //digitalWrite(PUMP_A_PIN, LOW);
  digitalWrite(PUMP_B_PIN, HIGH);
  digitalWrite(PUMP_A_PIN, LOW);
  //analogWrite(PUMP_PWM_PIN, 255-PWM_FAST); // PWM speed = fast
  delay(watering_level*2000);
  digitalWrite(PUMP_A_PIN, HIGH);
  digitalWrite(PUMP_B_PIN, HIGH);
}

void drawScreen()
