Hi all.
I am using Arduino for a few years now (Uno, Nano, Pro mini). Recently I bought a Arduino Due and it was a challange to program it.
After a while (with use of tutorials from internet) I got it working as I wanted to. But now I have a real problem. Due isn't running the loops I create. I tried for hours to fix the problem without succes.
Can someone tell me what can be the problem? I don't believe it's in the code. It's just a simple for loop with a serial write (project attached).
In the program I created some Serial writes to monitor the process. All the Serial.println that are in the loops aren't visible in de serial monitor.
I also tried a simple program and also without succes:
In this program I only get the serial writes:
Before Loop
After Loop
It also delays for 2 seconds and runs it again. Each time no print of value x.
I use the Arduino IDE and manually erase the flash before writing thru the programming port on the due.
Thanks for your relay but I think the < ain't gonna fix the problem. The only thing that is gonna change is de number of iterations to loop is making. >99 is true @ loop x = 100. <99 is true @ loop x = 99;
So in both cases the value x should be in the Serial print. And there not.
That's why I think it is not in the code but more in de Arduino due or Arduino IDE. I hope that someone can tell me more about this problem.
Racefreaka:
But I don't see differences in my code and the code you suggest.
Oops, I meant to change the > to < as el_supremo posted.
Racefreaka:
Thanks for your relay but I think the < ain't gonna fix the problem. The only thing that is gonna change is de number of iterations to loop is making. >99 is true @ loop x = 100. <99 is true @ loop x = 99;
So in both cases the value x should be in the Serial print. And there not.
No, the loop never runs with x>99 because it's never true. Please just make the change, upload the code and check the results.
I tried it and you guys are right. I don't know why I thought it would both work. But when I changed it it runs it. Now I go sit in a corner and shame my self