hi
i have question about TimerOne.h Libraries
i use this library for my project for interrupt purpose . but this order " Timer1.stop(); " doesn't work
I mean delay(6000) doesn't work .
2 Line ( 1 & 2 ) shows in serial imminently without delay !!! why ? do you know ?
can you help me how i solve this problem ?
this code is only for check interrupt . my mainly code is something else .
I need internal interrupt for my project with 30-60sec duration without delay .
in my mainly project One part must always work(get location and send that with GPRS in each 60sec ) and the other part to wait for the input data from the module sim808 (receive SMS then send location ).The combination of this two part does not work together.
#include <TimerOne.h>
#include <SoftwareSerial.h>
void setup()
{
Serial.begin(4800);
//mySerial.begin(4800);
pinMode(11, OUTPUT);
Timer1.initialize(1000000); // initialize timer1, and set a 1 second period
Timer1.setPeriod(8000000);
Timer1.attachInterrupt(Blink); // attaches Blink() as a timer interrupt function
}
void Blink()
{
digitalWrite(11, digitalRead(11) ^ 1);
Timer1.stop();
Serial.println("****1****");
delay(6000);
Serial.println("****2****");
Timer1.resume();
}
void loop()
{
//nothing
}
I mean delay(6000) dosn't work . 2 Line ( 1 & 2 ) shows in serial imminently without delay !!! why ? do you know ?