Matyk:
would this do it?
It compiles without error or warning. Does it do what you want it to do?
I don't see any place where 'buttonPushCounter' is set to anything other than 0.
void loop() {
buttonState = digitalRead(buttonPin);
if (buttonPushCounter+1) {
m1.attach(9);
m1.writeMicroseconds(myPulsetime + pulseIncrement);
delay(1);
} else {
...
}
}
Since buttonState is set but not used and buttonPushCounter is always 0 this is equivalent to:
void loop() {
m1.attach(9);
m1.writeMicroseconds(1250);
delay(1);
}
I don't think that will do what you wanted.