I'm newbie for arduino and i have one simple solution that i dont know what wrong with board or my code
my code is very simple below.
void setup(){
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
Serial.begin(9600);
while(!Serial){
; // wait for leonardo
}
}
void loop(){
if (Serial.available() > 1){
digitalWrite(0, HIGH);
}
else {
digitalWrite(1, HIGH);
}
}
when i'm upload to my arduino board it seem like Serial is not available and result always show LED on at pin 1. i think my code will turn LED at pin 0 on.
sorry for my simple question and i'll develop my code after i can through this step.