Hello
I have been using Arduino for some time, but recently started using it on Teensy 3.6.
Arduino 1.8.15
Teensyduino 1.54
All was going well but found that simple loops will just stop after about an hour.
Example:
(Note, my program was a lot more complicated than this, but when I found that it stopped, I kept commenting out different sections to see where the problem line was... until I got down to this very simple code, which still stopped!)
This will run normally, printing out the value of i1 on the Serial Monitor as expected.
But then after 165660 loops, it just stops.
Starts again normally after compile/upload, but then just stops again.
Have repeated this many times.
Any ideas?
Thanks
Gary
I have been using Arduino for some time, but recently started using it on Teensy 3.6.
Arduino 1.8.15
Teensyduino 1.54
All was going well but found that simple loops will just stop after about an hour.
Example:
(Note, my program was a lot more complicated than this, but when I found that it stopped, I kept commenting out different sections to see where the problem line was... until I got down to this very simple code, which still stopped!)
Code:
int readPin = A2; // ADC0
int i1 = 0;
void setup() {
Serial.begin(9600);
delay(500);
}
int value1 = 0;
void loop() {
Serial.println(i1);
delay(100);
i1 = i1+1;
}
This will run normally, printing out the value of i1 on the Serial Monitor as expected.
But then after 165660 loops, it just stops.
Starts again normally after compile/upload, but then just stops again.
Have repeated this many times.
Any ideas?
Thanks
Gary