void Speak(int pin){
if (count1%2) analogWrite(pin,0); else analogWrite(pin,255); //set the PWM to the just-read sample, this will average out because of the speaker’s inertia to a position
count1++; // increment sample
}
Speak4Timer.begin(Speak, 700);
Compiler gives me hell about not being of type void, but it IS of type void, it's just that the argument to the Speak function isn't a void.
I didn't see anything in the documentation (which is sparse for IntervalTimer) saying I couldn't do this.
Thanks.
if (count1%2) analogWrite(pin,0); else analogWrite(pin,255); //set the PWM to the just-read sample, this will average out because of the speaker’s inertia to a position
count1++; // increment sample
}
Speak4Timer.begin(Speak, 700);
Compiler gives me hell about not being of type void, but it IS of type void, it's just that the argument to the Speak function isn't a void.
I didn't see anything in the documentation (which is sparse for IntervalTimer) saying I couldn't do this.
Thanks.