I have made a simple program using the int main() {}
function. It has a delay in it. It is evident the code before the delay is running, but the delay never seems to time out and let the next instructions through. Is this by design?
If I rename the method and call it exactly once from the loop() {}
function though, it does work.
Edit:
The code borrowed the 'main()' function and I suppose redefined it:
int main() {
Forward();
delay(3000);
Reverse();
}
void Forward() {
//...
}
void Reverse() {
//...
}
I can see this redefinition of main()
could cause some serious issues based on the answer below.
main
, they useloop
– TheDoctor Mar 25 '14 at 0:19delay(999999999999999999999999999999999999999999999999);
will cause a fairly large problem (if the variable even is that big). | @Cyber It must be another language/bare C. It's weird that it compiled... – Anonymous Penguin Mar 25 '14 at 0:24main
(and you don't sound experienced enough to bypass the IDE). Show the simplest code that reproduces the problem. I'm guessing the problem will be very obvious to readers here. – Mud Mar 25 '14 at 4:10