the following code executes correctly when compiled/loaded on a Uno but skips the "Hello World" output on a leostick
Anyone know why? The monitor baud rate has no effect on the result
void setup()
{
Serial.begin(57600); // set up Serial library at 57600 bps
Serial.println("Hello world!"); // prints hello with ending line break
}
void loop()
{
Serial.println("Goodbye world!");
delay(1000);
}
Serial.print skipped in void setup()
Re: Serial.print skipped in void setup()
Try running this on a Leostick. the variable 'i' IS updated during setup, but the "Hello World" serial print ISN'T executed - or at least, it doesn't appear in the serial monitor window..
But works fine on a Uno! Am I missing something here?
int i=0;
void setup()
{
Serial.begin(57600);
i = 1;
Serial.println("Hello world!");
}
void loop()
{
Serial.print(i);
Serial.println(" Goodbye world!");
delay(1000);
}
But works fine on a Uno! Am I missing something here?
int i=0;
void setup()
{
Serial.begin(57600);
i = 1;
Serial.println("Hello world!");
}
void loop()
{
Serial.print(i);
Serial.println(" Goodbye world!");
delay(1000);
}