Professional Documents
Culture Documents
Blink
Turns on an LED on for one second, then off for one second,
repeatedly.
// the setup function runs once when you press reset or power
the board
void setup() {
// initialize digital pin 13 as an output.
pinMode(A2, OUTPUT);
pinMode(0, OUTPUT);
pinMode(A0,INPUT);
lcd.begin(16, 2);
lcd.setCursor(0, 1);
lcd.print("HI!");
lcd.setCursor(0, 0);
lcd.print("MAULANA IHSAN SY");
delay(3000);
lcd.clear();
}
}
else
{
lcd.setCursor(0, 1);
lcd.print("******AMAN******");
digitalWrite(0, LOW); // turn the LED on (HIGH is the
voltage level
digitalWrite(A2, LOW); // turn the LED off by making the
voltage LOW
delay(50);
lcd.clear();
}
}