Arduino - 無限迴圈



這是一個沒有終止條件的迴圈,所以迴圈會變成無限迴圈。

無限迴圈語法

使用 for 迴圈

for (;;) {
   // statement block
}

使用 while 迴圈

while(1) {
   // statement block
}

使用 do…while 迴圈

do {
   Block of statements;
} 
while(1);
arduino_loops.htm
廣告