int dip_switch_1=33;
int dip_switch_2=32;
int dip_switch_3=25;
int dip_switch_4=26;
void setup() {
// put your setup code here, to run once:
Serial.begin(9600);
pinMode(dip_switch_1, INPUT_PULLUP);
pinMode(dip_switch_2, INPUT_PULLUP);
pinMode(dip_switch_3, INPUT_PULLUP);
pinMode(dip_switch_4, INPUT_PULLUP);
}
void loop() {
// put your main code here, to run repeatedly:
//d1,d2,d3,d4 will store the dip switches digitalRead value
int d1=digitalRead(dip_switch_1);
int d2=digitalRead(dip_switch_2);
int d3=digitalRead(dip_switch_3);
int d4=digitalRead(dip_switch_4);
Serial.print("DIP Switch 1 value is : ");
Serial.println(d1);
Serial.print("DIP Switch 2 value is : ");
Serial.println(d2);
Serial.print("DIP Switch 3 value is : ");
Serial.println(d3);
Serial.print("DIP Switch 4 value is : ");
Serial.println(d4);
Serial.println("");
delay(1000);
}