// Blink 2 LEDs, one at 1.0405 second interval 30% duty cycle.
// The other at 0.4 sec period with an on-time of 0.05 seconds.
// A Third LED is controlled by acbutton. Click to activate, click to deactivate.


#include <blinker.h>
#include <mechButton.h>

blinker     firstBlinker(3);
blinker     secondBlinker;
int         thirdLEDPin;
bool        LEDOn;
mechButton  ourButton(2);

void setup() {

  firstBlinker.setPeriod(1040.5);
  firstBlinker.setPercent(30);
  firstBlinker.setOnOff(true);
  secondBlinker.setOnOff(true);
  ourButton.setCallback(buttonClk);
  thirdLEDPin = 10;
  LEDOn = false;
  pinMode(thirdLEDPin,OUTPUT);
}
  

void buttonClk(void) {

  if (!ourButton.getState()) {
    LEDOn = !LEDOn;
    digitalWrite(thirdLEDPin,LEDOn);
  }
}


void loop() { idle(); }