I'm new to this so the answer may be obvious to some, but, is there a better way to do this.
void loop(){
if firstTime do
analogReference(DEFAULT);
Set other parameters
XXXX
XXXX
firstTime=False;
else
do program
}
I'm new to this so the answer may be obvious to some, but, is there a better way to do this.
void loop(){
if firstTime do
analogReference(DEFAULT);
Set other parameters
XXXX
XXXX
firstTime=False;
else
do program
}
That's what the setup() function definition is for; you put all of your setup/init code there, it is only executed once - see:
Thanks for the quick reply.
I did try that with analogReference(DEFAULT) and had a compilation fault, but, thinking about it now, I think I had an spelling mistake in the parameter I specified.
Thanks Wallace