#include "RgbLed.h"
#include "Button.h"

#define LED_RED 11
#define LED_GREEN 10
#define LED_BLUE 9

#define BUTTON_RED_DOWN 7
#define BUTTON_GREEN_DOWN 6
#define BUTTON_BLUE_DOWN 5
#define BUTTON_RED_UP 4
#define BUTTON_GREEN_UP 3
#define BUTTON_BLUE_UP 2

RgbLed led(255, 255, 255, LED_RED, LED_GREEN, LED_BLUE);

Button redUpButton(&led, &RgbLed::redUp, BUTTON_RED_UP);
Button redDownButton(&led, &RgbLed::redDown, BUTTON_RED_DOWN);

Button greenUpButton(&led, &RgbLed::greenUp, BUTTON_GREEN_UP);
Button greenDownButton(&led, &RgbLed::greenDown, BUTTON_GREEN_DOWN);

Button blueUpButton(&led, &RgbLed::blueUp, BUTTON_BLUE_UP);
Button blueDownButton(&led, &RgbLed::blueDown, BUTTON_BLUE_DOWN);

void setup() 
{
  pinMode(LED_RED, OUTPUT);
  pinMode(LED_GREEN, OUTPUT);
  pinMode(LED_BLUE, OUTPUT);

  pinMode(BUTTON_RED_UP, INPUT_PULLUP);
  pinMode(BUTTON_GREEN_UP, INPUT_PULLUP);
  pinMode(BUTTON_BLUE_UP, INPUT_PULLUP);
  pinMode(BUTTON_RED_DOWN, INPUT_PULLUP);
  pinMode(BUTTON_GREEN_DOWN, INPUT_PULLUP);
  pinMode(BUTTON_BLUE_DOWN, INPUT_PULLUP);
}

void loop() 
{
  redUpButton.processButton();
  redDownButton.processButton();

  greenUpButton.processButton();
  greenDownButton.processButton();

  blueUpButton.processButton();
  blueDownButton.processButton();
}
uno:A5.2
uno:A4.2
uno:AREF
uno:GND.1
uno:13
uno:12
uno:11
uno:10
uno:9
uno:8
uno:7
uno:6
uno:5
uno:4
uno:3
uno:2
uno:1
uno:0
uno:IOREF
uno:RESET
uno:3.3V
uno:5V
uno:GND.2
uno:GND.3
uno:VIN
uno:A0
uno:A1
uno:A2
uno:A3
uno:A4
uno:A5
rgb2:R
rgb2:COM
rgb2:G
rgb2:B
r2:1
r2:2
r3:1
r3:2
r4:1
r4:2
btn1:1.l
btn1:2.l
btn1:1.r
btn1:2.r
btn2:1.l
btn2:2.l
btn2:1.r
btn2:2.r
btn3:1.l
btn3:2.l
btn3:1.r
btn3:2.r
btn4:1.l
btn4:2.l
btn4:1.r
btn4:2.r
btn5:1.l
btn5:2.l
btn5:1.r
btn5:2.r
btn6:1.l
btn6:2.l
btn6:1.r
btn6:2.r