Simple crude way: Connect to a PWM output pin, such as 3. Then: analogWrite (3, 128); delay (2000); analogWrite (3, 0);