how to get 4 leds to blink all at the same time
If you put 4 red LEDs in series on pin 13, you may be able to use the Blink sketch coming with Arduino IDE.
The typical voltage drop of a red LED is 1.8 volts so that will probably not work. If you put them in parallel that might cause uneven brightness, but they should light up. The most complex way would be to connect an appropriate resistor to each of four pins (say 330 ohm for 15mA) and each resistor to the anode of each LED and the cathode of each LED back to the ground on the Arduino. Then push those 4 pins to 1 to turn the LEDs on and then to 0 to turn them off. The arduino blink sketch:
void loop() {
digitalWrite(led, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
would be modified to something like this:
void loop() {
digitalWrite(led1, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(led2, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(led3, HIGH); // turn the LED on (HIGH is the voltage level)
digitalWrite(led4, HIGH); // turn the LED on (HIGH is the voltage level)
delay(1000); // wait for a second
digitalWrite(led1, LOW); // turn the LED off by making the voltage LOW
digitalWrite(led2, LOW); // turn the LED off by making the voltage LOW
digitalWrite(led3, LOW); // turn the LED off by making the voltage LOW
digitalWrite(led4, LOW); // turn the LED off by making the voltage LOW
delay(1000); // wait for a second
}
where led1, led2, led3, led4 are the pins you have chosen for your resistor/LED combinations