Greetings,
First, I am really excited to get into this micro! Looks like a lot of fun. I'm new, and I hope I don't violate some forum rule in this post!
I had some questions while I struggle with continuing to learn C and then starting arduino.
-
variable declarations -- I am confused on where the arduino ide would put my "mycount" variable as I normally would code it. I guess my main concern is that it is not visible to functions, ie, it is Automatic. See code below.
-
What about function prototypes. Does this work in arduino ide? (I read how arduino build process scans and builds function prototypes but I would rather do it as below.
int myfunc(void); // is this ok??
int main(void)
{
int mycount = 500; // this variable is not accessible inside functions, right??
// code here
mycount++;
myfunc();
//more code etc.
return 0;
}
int myfunc(void)
{
int myfuncvar; // this variable is not visible outside the function, right??
// more code here.
return 0;
}
From just reading the examples, I am impressed how the arduino ide allows easy access to the AVR timers, etc. Normally, using these is much more technical.
I am looking forward using the arduino h/w and s/w.
Best Regards,
Steve.