#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();
}