+ 2

While loop in Arduino.ino

Why while loops have problem running in arduino programs ?

18th Feb 2018, 12:23 AM
Kiavash Nadershah
Kiavash Nadershah - avatar
2 odpowiedzi
+ 4
I dunno what kind of problem you faced.... The Problem that I can guess.... 1.Arduino has the slow spec but cheap that can make many robots(Ok nope That's impossible) 2.You didn't make kind of stop statement for while loop at all
18th Feb 2018, 1:09 AM
Yanothai Chaitawat
Yanothai Chaitawat - avatar
+ 2
Actually the assumed c code for an arduino IDE blank sketch void setup(){} void loop(){} looks like this: void setup(void); //function prototypes void loop(void); int main(void) { setup(); while(1) { loop(); // repeat this over and over again } return 0; // this never happens } therefore there can't be problems with while loops
25th Feb 2018, 12:12 PM
seamiki
seamiki - avatar