   state = determine_state();  // open/closed
   condition = determine_cond(); // rain or not
   fault = determine_fault(); // check for motor fault
+  rain_mv = MILLIVOLTS_PER_COUNT * float(analogRead(APIN_RAIN));
   // print if there is a state change
   if (state != last_state) {
     if (state==STATE_OPENED) {

// Rain 
#define DPIN_RAIN 12           
// input from rain sensor (digital)

// Global variables


int requeststate = STATE_CLOSED;
int last_state = STATE_UNKNOWN;
int fault, condition;   // global
float duration, rain_mv;

AccelStepper stepper(AccelStepper::DRIVER, DPIN_STEP, DPIN_DIR);  // sets up 2-wire stepper driver

