Intro: RPi Pwm Led Strobe
Here's a Raspberry Pi driving a bank of 72 leds in parallel. They are driven using pulse width modulation through a npn power transistor. The leds are from a 6v torch and there is no series resistor. Above 60 Hz they look on even with 10% duty cycle.
Python code for RPi to flash led via power transistor using PWM pin 25
import RPi.GPIO as GPIO
strobefreq = input("Frequency? ")
strobemark = input("Mark? ")
strobe = GPIO.PWM(25,strobefreq)
strobe.stop #never gets here