Skip to content

loop/while/for problem #279

Open
Open
@freakdaddy

Description

@freakdaddy

This example code does not print 0-127 as you would expect, it only prints 0. The thread that I've linked to below hints that it may be a 5.4.0 issue.

"With IDE 1.8.4 (avr-gcc 4.9.2) it works as expected. With IDE 1.8.8 (avr-gcc 5.4.0) it fails, prints 0, once. Must be another 5.4.0 bug. Use the 4.9.2 toolchain."

void setup() {
  Serial.begin(115200);
}

void loop() {
  while (1) {
    for (byte i = 0 ; i < 128 ; i++) {
      Serial.println(i);
    }
  }
}

https://forum.arduino.cc/index.php?topic=621017.0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions