Skip to content

Instantly share code, notes, and snippets.

@iFreilicht
Last active August 10, 2017 17:59
Show Gist options
  • Save iFreilicht/68830ad183564bc10920db33836927e2 to your computer and use it in GitHub Desktop.
Save iFreilicht/68830ad183564bc10920db33836927e2 to your computer and use it in GitHub Desktop.
Demo-code of a potential bug in ArduinoSTL
#include <ArduinoSTL.h>
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
}
bool led_on = false;
void loop() {
printf("running... ");
digitalWrite(13, led_on = !led_on ? HIGH : LOW);
delay(500);
}
void setup() {
Serial.begin(9600);
pinMode(13, OUTPUT);
}
bool led_on = false;
void loop() {
Serial.println("running... ");
digitalWrite(13, led_on = !led_on ? HIGH : LOW);
delay(500);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment