void setup() {
Serial.begin(115200);
Serial.println("You won't see me!");
pinMode(2, OUTPUT);
}
void loop() {
if(Serial.available()){
int state = Serial.parseInt();
if(state == 1){
digitalWrite(2, HIGH);
Serial.println("Led Hidup");
}
if(state == 2){
digitalWrite(2, LOW);
Serial.println("Led Mati");
}
}
}