int button1 = 7;
int button2 = 8;
int button3 = 9;
void setup() {
pinMode(button1, INPUT_PULLUP);
pinMode(button2, INPUT_PULLUP);
pinMode(button3, INPUT_PULLUP);
Serial.begin(9600);
}
void loop() {
if (digitalRead (button1) == LOW) {
Serial.println
("Nama : Ahmad Soni ");
delay(1000);
}else if (digitalRead (button2) == LOW){
Serial.println
("NIM : 230536604380");
delay(1000);
}else if(digitalRead (button3) == LOW){
Serial.println
("Prodi : S1 TEKNIK ELEKTRO");
delay(1000);
}
}