//include the library in the program
#include <singleLEDLibrary.h>
#include <PinButton.h>

//declare your led objects that you will be using, light1 is connected to pin 9 and light 2 to pin 10
sllib led(11);
PinButton myButton(13);
int mode = 0;

void setup() {
  //we make sure that our led's are doing something on startup
  led.setBlinkSingle(500);

}

void loop() {
  myButton.update();

  //we call the update function for both led's here. Don't forget these!
  led.update();

  //if the button is pushed down we set light2 to be off.
  //when the button is not pressed it breathes.
  if (myButton.isClick()) {
    mode += 1;
    if (mode == 5) {
      mode = 0;
    }
    Serial.println(mode);
    if (mode == 0) {
      led.setBlinkSingle(500);
    }
    else if (mode == 1) {
      led.setBlinkSingle(250);
    }
    else if (mode == 2) {
      led.setBreathSingle(500);
    }
    else if (mode == 3) {
      led.setBreathSingle(2000);
    }
    else {
      led.setBlinkSingle(100000);
    }
  }


}