I suspect my Arduino UNO broken, but I do not it is true broken or any else. My pin 13 (which contain build in led) always ON
And after I upload this code:
void setup()
{
Serial.begin(9600);
digitalWrite (13,LOW);
}
void loop()
{
while (Serial.available()==0);
int val = Serial.read () - '0';
if (val ==1)
{
Serial.println("Led is On");
digitalWrite(13,HIGH);
}
else if (val == 0)
{
Serial.println("Led is off");
digitalWrite(13,LOW);
}
else
{
Serial.println("Invalid");
}
}
then I open serial monitor,
i input 0, then it displays "Led is off", but the led is not turned off
WHAT HAPPEN TO MY ARDUINO?? ANY HELP PLEASE...