Why in Arduino mode is an empty function added at the end?
void loop()
_loop(); // in the end of void loop
}
void _delay(float seconds){
long endTime = millis() + seconds * 1000;
while(millis() < endTime)_loop();
}
void _loop(){
}
Why in Arduino mode is an empty function added at the end?
void loop()
_loop(); // in the end of void loop
}
void _delay(float seconds){
long endTime = millis() + seconds * 1000;
while(millis() < endTime)_loop();
}
void _loop(){
}
Is “Arduino mode” an option in the mBlock program?
I’m using the Arduino IDE and I don’t get the same structure.
For Arduino IDE 1.8.0 …when I invoke File/New, I get:
void setup() {
// put your setup code here, to run once:
}
void loop() {
// put your main code here, to run repeatedly:
I have no idea why it adds it to the main loop (my programs run fine without it), but the_delay function, which allows programming delays in seconds in mBlock, uses it to convert to milliseconds.