#define LED1 11
#define LED2 10
#define ButMinus 4
#define ButPlus 3
#define ButBright 2
int function=1;
int bright=127;
int lastKey=0;
int keyCount=0;
boolean LED_State=LOW;
unsigned long lastMillis=0;
const long Interval1=500;
const long Interval2=250;
void setup()
{
pinMode(LED1, OUTPUT);
pinMode(LED2, OUTPUT);
pinMode(ButMinus, INPUT_PULLUP);
pinMode(ButPlus, INPUT_PULLUP);
pinMode(ButBright, INPUT_PULLUP);
}
void LEDs_Change(boolean s1, boolean s2)
{
digitalWrite(LED1, s1);
digitalWrite(LED2, s2);
}
void ON()
{
LEDs_Change(HIGH,HIGH);
}
void OFF()
{
LEDs_Change(LOW,LOW);
}
void Flash01()
{
unsigned long currentMillis=millis();
if (currentMillis - lastMillis >= Interval1)
{
lastMillis=currentMillis;
LED_State=!LED_State;
}
LEDs_Change(LED_State,LED_State);
}
void Flash02()
{
unsigned long currentMillis=millis();
if (currentMillis - lastMillis >= Interval1)
{
lastMillis=currentMillis;
LED_State=!LED_State;
}
LEDs_Change(LED_State,!LED_State);
}
byte ReadKey()
{
byte key=0;
}
void SetFunction()
{
}
void loop()
{
// put your main code here, to run repeatedly:
//Flash01();
Flash02();
}