Pages: [1]   Go Down
Author Topic: endless loop in Leonardo  (Read 92 times)
0 Members and 1 Guest are viewing this topic.
South Africa, Mpumalanga, Witbank
Offline Offline
Newbie
*
Karma: 2
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

Hi to all
I have this problem with Leonardo. Code works fine on uno.

void setup(){

  Serial.begin(9600);
  while(!Serial){
  }
}


This is a simple code but my Leonardo stay inside the while(!Serial) loop. I even added Serial.begin after while loop but still. It never go to void loop()

Logged

Today I know more than Yesterday!

Narvik, Norway
Offline Offline
God Member
*****
Karma: 23
Posts: 995
electronics engineer, teacher.
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

try change to  :  !Serial()
Logged

Ny

South Africa, Mpumalanga, Witbank
Offline Offline
Newbie
*
Karma: 2
Posts: 6
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

For fun I did that but I gave me a error.
I removed the while loop and then nothing happens.
Is there no one with arduino Leonardo that can help
Logged

Today I know more than Yesterday!

Pages: [1]   Go Up
Jump to: