Skip to content

Instantly share code, notes, and snippets.

@huytd
Last active August 29, 2015 14:00
Show Gist options
  • Save huytd/e8b3b7396f2a2add4e25 to your computer and use it in GitHub Desktop.
Save huytd/e8b3b7396f2a2add4e25 to your computer and use it in GitHub Desktop.
int led = 13;
void setup() {
// đưa pin 13 về chế độ OUTPUT
pinMode(led, OUTPUT);
}
// hàm lặp chính - nơi xử lý tất cả mọi thứ cho một chương trình Arduino
void loop() {
digitalWrite(led, HIGH); // bật đèn
delay(1000); // chờ 1 giây
digitalWrite(led, LOW); // tắt đèn
delay(1000); // chờ tiếp 1 giây nữa
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment