When compiling


here's code:

  int buttonpin = 10;
  int buttonstate = 0;
  int photopin = 0;
  int photovalue = 0;
  int ledpin = 11;
void setup ()
{
  pinmode (buttonpin, input);
  pinmode (photopin, input);
  pinmode (ledpin, output);
}
void loop ()
{
  buttonstate = digitalread (buttonpin);
  photovalue = analogread (photopin);
if (buttonstate == high)
{
    digitalwrite(ledpin, high);
    delay(500);
    digitalwrite(ledpin, low);
    delay(500);
}
else if (photovalue <= 10)
{
    digitalwrite(ledpin, high);
    delay(750);
    digitalwrite(ledpin, low);
    delay(750);
}
else () // error: expected primary-expression before ')' token problem  =(
{
    digitalwrite(ledpin, high);
    delay(1000);
    digitalwrite(ledpin, low);
    delay(1000);
}
}
and me shows 2 problems:  :0 :0 =( =(
1.  error: expected primary-expression before ')' token
2.  error: expected `;' before '{' token

please help!!!! thanks.  :)

code: [select]
else ()
"else" not function.


Arduino Forum > Using Arduino > Programming Questions > When compiling


arduino

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support