Hi Janniche,
First off, looking at your schematic you don't seem to have any resistors to limit current to the LED's and driving 5x LED's from one I/O pin will probably draw to much current and damage your LilyPad.
The code you supplied has a few errors like extra void loop() and spurious extra { and } brackets. You have a button in the schematic but don't read it in your main loop to increment buttonPushCounter, you just continually increment buttonPushCounter so it will quickly go from 0 to 1 and 2 then beyond that you don't check for any more states.
Push buttons become very unresponsive when you use long delays in the code as you have.
void loop(){
if (digitalRead(pushbutton) == HIGH){
delay(20); // button debounce
buttonPushCounter++;
if (buttonPushCounter > 2){
buttonPushCounter = 1;
}
}
Serial.println("on");
Serial.print("number of button pushes: ");
Serial.println(buttonPushCounter, DEC);
if(buttonPushCounter == 1) {
digitalWrite(shoulder, HIGH);
digitalWrite(back, HIGH);
digitalWrite(frontdown, HIGH);
digitalWrite(fronttop, HIGH);
}
if(buttonPushCounter == 2) {
digitalWrite(shoulder, HIGH);
digitalWrite(back, HIGH);
digitalWrite(frontdown, HIGH);
digitalWrite(fronttop, HIGH);
delay(500); // wait for 0,5 second
digitalWrite(shoulder, LOW);
digitalWrite(back, LOW);
digitalWrite(frontdown, LOW);
digitalWrite(fronttop, LOW);
delay(500);
}
}