 
       // Button pressed for less than 6 seconds, turn on.
       if (secs_held < 6) {
-          Serial.print("Short Press: ");
+        Serial.print("Short Press: ");
         Serial.print(secs_held);
         Serial.print("   Milliseconds held: ");
         Serial.println(millis_held);
         ledblink(10,200,ledPin); 
+        //Turn on sockets
+        turnSocketsOn();
       }
 
       // Button held for more than 6 seconds, turn off.

byte previous = HIGH;
unsigned long firstTime; // how long since the button was first pressed 


void setup() {
  Serial.begin(9600);         // Use serial for debugging
  pinMode(ledPin, OUTPUT);
  digitalWrite(inPin, HIGH);  // Turn on 20k pullup resistors to simplify switch input
}

    delay(lengthms);
  }
}

//Function to send a radio signal to turn sockets on
void turnSocketsOn() {
  mySwitch.sendTriState(A_Button_On);
  // Send ON signal to PI 
}
//Function to send a radio signal to turn sockets off
void turnSocketsOff() {
  mySwitch.sendTriState(A_Button_Off);
  // Send OFF signal to PI
}
