/*
  文件名称：ESP32_IO_TEST.ino
  功能：所有可用IO循环点亮后循环熄灭
*/

#define PIN_RELAY1 32
#define PIN_RELAY2 33
#define PIN_RELAY3 25 
#define PIN_RELAY4 26
#define PIN_RELAY5 27
#define PIN_RELAY6 14
#define PIN_RELAY7 12 
#define PIN_RELAY8 13
#define PIN_LED    23


void setup() 
{
 pinMode(PIN_RELAY1, OUTPUT);      //输出模式  
 pinMode(PIN_RELAY2, OUTPUT);      //输出模式
 pinMode(PIN_RELAY3, OUTPUT);      //输出模式  
 pinMode(PIN_RELAY4, OUTPUT);      //输出模式
 pinMode(PIN_RELAY5, OUTPUT);      //输出模式  
 pinMode(PIN_RELAY6, OUTPUT);      //输出模式
 pinMode(PIN_RELAY7, OUTPUT);      //输出模式  
 pinMode(PIN_RELAY8, OUTPUT);      //输出模式
 pinMode(PIN_LED, OUTPUT);         //输出模式
 digitalWrite(PIN_RELAY1,LOW );    //IO默认关闭
 digitalWrite(PIN_RELAY2,LOW );    //IO默认关闭
 digitalWrite(PIN_RELAY3,LOW );    //IO默认关闭
 digitalWrite(PIN_RELAY4,LOW );    //IO默认关闭
 digitalWrite(PIN_RELAY5,LOW );    //IO默认关闭
 digitalWrite(PIN_RELAY6,LOW );    //IO默认关闭
 digitalWrite(PIN_RELAY7,LOW );    //IO默认关闭
 digitalWrite(PIN_RELAY8,LOW );    //IO默认关闭
 digitalWrite(PIN_LED,LOW );       //IO默认关闭
}

void loop() 
{
  digitalWrite(PIN_RELAY1,HIGH );       
  delay(100); //延时0.1S
  digitalWrite(PIN_RELAY2,HIGH );       
  delay(100); //延时0.1S
  digitalWrite(PIN_RELAY3,HIGH );       
  delay(100); //延时0.1S
  digitalWrite(PIN_RELAY4,HIGH );       
  delay(100); //延时0.1S
  digitalWrite(PIN_RELAY5,HIGH );       
  delay(100); //延时0.1S
  digitalWrite(PIN_RELAY6,HIGH );       
  delay(100); //延时0.1S
  digitalWrite(PIN_RELAY7,HIGH );       
  delay(100); //延时0.1S
  digitalWrite(PIN_RELAY8,HIGH );       
  delay(100); //延时0.1S
  digitalWrite(PIN_LED,HIGH );       
  delay(100); //延时0.1S
 
  
  digitalWrite(PIN_RELAY1,LOW );
  delay(100); //延时0.1S
  digitalWrite(PIN_RELAY2,LOW );
  delay(100); //延时0.1S
  digitalWrite(PIN_RELAY3,LOW );
  delay(100); //延时0.1S
  digitalWrite(PIN_RELAY4,LOW );
  delay(100); //延时0.1S
  digitalWrite(PIN_RELAY5,LOW );
  delay(100); //延时0.1S
  digitalWrite(PIN_RELAY6,LOW );
  delay(100); //延时0.1S
  digitalWrite(PIN_RELAY7,LOW );
  delay(100); //延时0.1S
  digitalWrite(PIN_RELAY8,LOW );
  delay(100); //延时0.1S
  digitalWrite(PIN_LED,LOW );
  delay(100); //延时0.1S
}
