#ifndef __LEDCONTROL_H_
#define __LEDCONTROL_H_

#define PIN_LED_RED    9
#define PIN_LED_GREEN  5
#define PIN_LED_BLUE   6

#define PIN_BUZZER    15 // 19

#define PIN_SNS_SOUND 14 // 18
#define PIN_SNS_LIGHT 16 // 20

#define PIN_TOUCH0     8
#define PIN_TOUCH1    12
#define PIN_TOUCH2    10
#define PIN_TOUCH3    11

#define INDEX_TOUCH_ALARM  0x4
#define INDEX_TOUCH_INC    0x5
#define INDEX_TOUCH_DEC    0x6
#define INDEX_TOUCH_SET    0x3
#define INDEX_TOUCH_DSIP   0x2
#define INDEX_USER_A       0x7
#define INDEX_USER_B       0x0
#define INDEX_USER_C       0x1
#define INDEX_RELEASE      0xf

const word FREQ[] = {
  130, 139, 147, 156, 165, 175, 185, 196, 208, 220, 233, 247,
  262, 277, 294, 311, 330, 349, 370, 392, 415, 440, 466, 494, 523,
  554, 587, 622, 659, 698, 740, 784, 831, 880, 932, 988, 1047, 1109,
  1175, 1245, 1319, 1397, 1480, 1568, 1661, 1760, 1865, 1976, 2093, 2217,
  2349, 2489, 2637, 2794, 2960, 3136, 3322, 3520, 3729, 3951, 4186, 
};

void initLED();
void ledControl(long color);
void ledControl(byte red, byte green, byte blue);
//void buzzerControl(int index);
bool buzzerControl(int index, int duration = 0);
void buzzerOff();
bool isPushed(byte index);
byte getTouchState();
byte getLightSensorValue();
byte getSoundSensorValue();

#endif

