int LEDpin = 2; // connect MIC pin 4 to Arduino pin 2
void setup()
{
pinMode(LEDpin, OUTPUT); // Tells the arduino which pin is used
}
int Cycle = 0;
While (Cycle < 10)
{
if (cycle < 9)
{
digitalWrite(LEDpin, HIGH); // Turn the LED on
Serial.println("LED IS ON"); // display text to verify led is on
delay(1000); // Wait for 1 second
digitalWrite(LEDpin, LOW); // Turn the LED off
Serial.println("LED IS OFF"); // display text to verify led is off
delay(500); // Wait for .5 second
}
else
{
digitalWrite(LEDpin, HIGH); // Turn the LED on
delay(2000); // Wait for 2 second
digitalWrite(LEDpin, LOW); // Turn the LED off
delay(500); // Wait for .5 second
}
cycle = cycle + 1;
}
***> Blockquote***
here is the error message
C:\Users\mbanks\Documents\Arduino\MOSFET_LED\MOSFET_LED.ino:9:7: error: expected constructor, destructor, or type conversion before '(' token
While (Cycle != 10) {
^
exit status 1
Compilation error: expected constructor, destructor, or type conversion before '(' token