 
 
 ///////////////////////////////////////////////////////////////////////////////////////////////////////////// 
-//                                                 LOAD WASHER
-
-int loadWasherPin = A0;
-int analog_load_value = 0;
-double load_in_lbs = 0;
+//                                                 3. LOAD WASHER 1 & 2
+
+int loadWasher1Pin = A0;
+int loadWasher2Pin = A1;
 
 //Insert Calibration Data Here: Level = AX + B format (rounded to the nearest integer N)
+//We assume that the two load washers have the same calibration curve
 //X is the applied weight in lbs
 //A is our linear rate in Arduino ADC levels / lbs
 //B is our reference level as applied by the amplifyer circuit
 double A_linear_rate = 0.01;
 double B_reference_level = 483.854;
 
-///////////////////////////////////////////////////////////////////////////////////////////////////////////// 
-//                                                LEVEL SENSOR
-
+//Initialize variables
+int analog_load1_value = 0;
+int analog_load2_value = 0;
+double load1_in_lbs = 0;
+double load2_in_lbs = 0;
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////// 
+//                                                4. LEVEL SENSOR
+
+int levelSensorPin = A2;
+
+//Insert Calibration Data Here: Level = AX + B format (rounded to the nearest integer N)
+//X is the water depth in cm
+//A is the calibration slope in levels / cm
+//B is the reference level
+double A_water_rate = 11.96;
+double B_water_reference_level = 327.45;
+double vesicle_diameter_cm = 11.43;//4.5 inch x 2.54 cm / inch
+double vesicle_area_cm_2 = (3.14159) * (vesicle_diameter_cm / 2) * (vesicle_diameter_cm / 2);
+
+//Initialize variables
 boolean initialize = true;
-int levelSensorPin = A1;
 int analog_water_level = 0;
 double water_level_cm = 0;
 double flow_calc_water_level_cm = 0;
 unsigned long calc_time_ms = 0;
 
-double vesicle_diameter_cm = 11.43;//4.5 inch x 2.54 cm / inch
-double vesicle_area_cm_2 = (3.14159) * (vesicle_diameter_cm / 2) * (vesicle_diameter_cm / 2);
-
-//Insert Calibration Data Here: Level = AX + B format (rounded to the nearest integer N)
-double A_water_rate = 11.96;
-double B_water_reference_level = 327.45;
-
-///////////////////////////////////////////////////////////////////////////////////////////////////////////// 
-//                                                SOLENOID DRAIN VALVE
+
+///////////////////////////////////////////////////////////////////////////////////////////////////////////// 
+//                                                5. SOLENOID DRAIN VALVE
 
 
 int solenoidValvePin = 14; //Pin controlling the valve

 analog_water_level = analogRead(levelSensorPin);
 water_level_cm = ( analog_water_level - B_water_reference_level ) / A_water_rate;

if(initialize==true){
  flow_calc_water_level_cm = water_level_cm;
  calc_time_ms = millis();

//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                           SENSOR NETWORK FIRMWARE

// This is the code for the sensor node. It integrates the following SENSORS an prints data to the serial monitor. 
// 1. Temperature Sensors.
//      At various locations around the pump
// 2. Tachometer
//      Measuring the rpms of the 
// 3. Load Washers 1 & 2
// 4. Level Sensor

//The following are driven based on the sensor values:
// 5. Solenoid Drain Valve
// 6. The Serial Monitor
//      The data from each sensor is printed on the serial monitor. The data on the serial monitor will be picked up
//      by the Zigbee module and will be available on the baseNode





//////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                                           1. TEMPERATURE SENSOR
#include <OneWire.h>
#include <DallasTemperature.h>

