Closed GoogleCodeExporter closed 9 years ago
You can overwrite the main() function in your Arduino sketch. I actually do
this more than I use setup() and loop(). You simply use the following code.
#include <WProgram.h>
int main(void)
{
init();
//This is where your program goes. The default main() just calls setup then
//continuously call loop().
return 0;
}
Local main() variable should be declared before init();, and globals are
declared outside of main().
Original comment by saberbat...@gmail.com
on 11 Dec 2010 at 3:20
I'm not quite sure what you're asking for. If it's a way to override main(),
it sounds like that's possible already. Or was there something else you were
going for? If so, please start a new issue for it so it doesn't get lost.
Original comment by dmel...@gmail.com
on 15 Aug 2011 at 8:40
Original issue reported on code.google.com by
gray.mal...@gmail.com
on 10 Jul 2010 at 11:31