When posting code please select it and hit the # icon to get it formatted correctly.
Try this, you need a delay between each section, it might be best to start the down bit at the same frequency as the up bit finished.
void setup () {
pinMode(12,OUTPUT);
}
void loop () {
int i;
int x;
for ( i=500; i>100; i--)
{
for ( x=0; x<5; x++)
{
digitalWrite (12,HIGH);
delayMicroseconds (i);
digitalWrite (12,LOW);
delayMicroseconds (i);
}
}
delay(200);
for (i=100; i<700; i++)
{
digitalWrite (12,HIGH);
delayMicroseconds(i);
digitalWrite(12,LOW);
delayMicroseconds(i);
}
delay(500);
}