//Author: eletechsup
//More information welcome to : http://www.485io.com 
//Arduino IDE 2.2.1
//DNLCB30 Expansion Board for ESP32 30PIN BOARD
//When the DNLCB30 IO port is connected to GND, the LED on the ESP32 board will light up.
//When RX0/TX0 is used as an input pin, it should be set to pull up


void setup() {    

  pinMode(2, OUTPUT);            
  pinMode(15, INPUT);
  pinMode(4, INPUT);
  pinMode(16, INPUT);
  pinMode(17, INPUT);
  pinMode(5, INPUT);
  pinMode(18, INPUT);
  pinMode(19, INPUT);
  pinMode(21, INPUT);
  pinMode(3, INPUT_PULLUP);//RX0
  pinMode(1, INPUT_PULLUP);//TX0
  pinMode(22, INPUT);
  pinMode(23, INPUT);
  pinMode(36, INPUT);//VP
  pinMode(39, INPUT);//VN
  pinMode(34, INPUT);
  pinMode(35, INPUT);
  pinMode(32, INPUT);
  pinMode(33, INPUT);
  pinMode(25, INPUT);
  pinMode(26, INPUT);
  pinMode(27, INPUT);
  pinMode(14, INPUT);
  pinMode(13, INPUT);
 
}
void loop() {  

if      (digitalRead(15) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(4) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(16) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(17) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(5) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(18) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(19) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(21) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(3) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(1) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(22) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(23) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(36) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(39) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(34) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(35) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(32) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(33) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(25) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(26) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(27) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(14) == LOW) {digitalWrite(2, HIGH); } 
else if (digitalRead(13) == LOW) {digitalWrite(2, HIGH); } 
else {  digitalWrite(2, LOW);}



}

     
