Set up scheduled program cycles #24
|
@ -69,7 +69,6 @@ int yourInputNtransmitters;
|
||||||
int step_length = 10000; // 10 secs
|
int step_length = 10000; // 10 secs
|
||||||
int cycle_id = 1; // number of this transmitter in cycle
|
int cycle_id = 1; // number of this transmitter in cycle
|
||||||
int n_transmitters = 2; //number of transmitters total
|
int n_transmitters = 2; //number of transmitters total
|
||||||
long previousMillis = 0;
|
|
||||||
long start_millis = 0;
|
long start_millis = 0;
|
||||||
long stop_millis = 0;
|
long stop_millis = 0;
|
||||||
long pause_millis = 0;
|
long pause_millis = 0;
|
||||||
|
@ -720,21 +719,16 @@ void loop() {
|
||||||
//morseToSend_blink.Reset().Update();
|
//morseToSend_blink.Reset().Update();
|
||||||
//morses_sequence_blink.Reset();
|
//morses_sequence_blink.Reset();
|
||||||
//Serial.println("Start up cycle");
|
//Serial.println("Start up cycle");
|
||||||
// if(currentMillis - previousMillis > step_length) {
|
|
||||||
if((millis() > start_millis) & (millis() < stop_millis)){
|
if((millis() > start_millis) & (millis() < stop_millis)){
|
||||||
// save the last time you started sending
|
|
||||||
// previousMillis = currentMillis;
|
|
||||||
if (!sender.continueSending()){
|
if (!sender.continueSending()){
|
||||||
// Set the internal counters to the message's beginning.
|
// Set the internal counters to the message's beginning.
|
||||||
// Here, this results in repeating the message indefinitely.
|
// Here, this results in repeating the message indefinitely.
|
||||||
sender.startSending();
|
sender.startSending();
|
||||||
}
|
}
|
||||||
} else if((millis() > stop_millis) & (millis() < pause_millis)){
|
} else if((millis() > stop_millis) & (millis() < pause_millis)){
|
||||||
// do nothing
|
// do nothing in this case -- in between cycles
|
||||||
} else if((millis() > pause_millis)){
|
} else if((millis() > pause_millis)){
|
||||||
startProgram = true;
|
startProgram = true;
|
||||||
//start_millis = millis() + step_length;
|
|
||||||
//stop_millis = start_millis + step_length;
|
|
||||||
}
|
}
|
||||||
// if the cycle program is not running
|
// if the cycle program is not running
|
||||||
} else if((yourInputSend == 2) & (programRunning == false)){
|
} else if((yourInputSend == 2) & (programRunning == false)){
|
||||||
|
|
Loading…
Reference in New Issue
Block a user