my code is redused to minimal so you can understand what I need.
so my code needs to be like this ?
#include <Time.h>
#include <TimeAlarms.h>
#include <Stepper.h>
int MYType;
int resetPin = A2;
int addHourPin = A3;
int addMinPin = A4;
int ID ;
int ID2 ;
const int stepsPerRevolution = 48;
Stepper stepper(stepsPerRevolution, 8, 9, 10, 11);
void setup(){
stepper.setSpeed(150);
setTime(0,0,0,1,1,11);
ID = Alarm.timerOnce(60, spinning);
ID2=Alarm.timerRepeat(3600, spinning);
// Alarm.timerOnce(60, spinning); //step motor spins 60 sec after boot
// Alarm.timerRepeat(3600, spinning); //step motor spins after an hour
}
void loop(){
RANDOM COMMANDS ;
/*=========== GENERAL reset pin. Everithing resets to zero when presed=============*/
if(digitalRead(resetPin) == HIGH){
Resetingeverithing ();
//command to turn off Alarm.timers
disable(ID);
disable(ID2);
setTime(0,0,0,1,1,11); //at this point Alarms are trigered always
//command to turn on Alarm.timers
enable(ID);
enable(ID2);
}//end of reset
} //END of LOOP
void Resetingeverithing () {
Alarm.delay (2000);
lcd.clear();
lcd.print("timer will be set back to zero");
//going back to loop
}
void spinning (){
stepper.step(100);
}
because it gives me this
sketch_feb21a:41: error: 'disable' was not declared in this scope
sketch_feb21a:45: error: 'enable' was not declared in this scope