Go Down

Topic: Comp failed (Read 590 times) previous topic - next topic

TMX

get the comp failed with no reason as to why

void setup()
{
 pinMode(2,INPUT_PULLUP);
 pinMode(13, OUTPUT);
}
void loop()
  //define loop - loop to check button press
  //is button input2 pressed
  //yes turn on led for 0.1 sec, then turn off
  {
 
  if (digitalRead(2==LOW))
  {
    digitalWrite(13, HIGH);
    delay(100);
    digitalWrite(13, LOW);
  }
}

TMX

would like to add that this is my first day in Arduino.

pert

Welcome to Arduino! Sorry to hear you're having a problem.

This might be relevant:
http://forum.arduino.cc/index.php?topic=553932

Go Up