hi guys i`m doing the Spin Motor circ-03 and this message appears motoOnThenOff was not delclared in this scope what do i have to do to solve it?
here is my sketch
int motorPin= 9;
void setup()
{
// put your setup code here, to run once:
pinMode(motorPin, OUTPUT);
}
void loop()
{
motorOnThenOff();
//motorOnThenOffWithSpeed();
//motorAcceleration();
}
void motoronThenOff(){
int onTime = 2500;
int offTime= 1000;
digitalWrite(motorPin, HIGH);
delay(onTime); //waits for onTime milliseconds
digitalWrite(motorPin, LOW);
delay(offTime);
}
void motorOnThenOffWithSpeed() {
int onSpeed = 200;
int onTime = 2500;
int offSpeed = 50;
int offTime = 1000;
analogWrite(motorPin, onSpeed);
delay(offTime);
}
void motorAcceleration(){
int delayTime = 50;
for(int i = 0; i < 256; i++);{
analogWrite(motorPin, 1);
delay(delayTime);
}
for(int i = 255; i >=0; i--){
analogWrite(motorPin, 1);
delay(delayTime);
}
}