Giới thiệu
Trong bài viết này, chúng ta sẽ tìm hiểu cách lập trình robot xe tự hành di chuyển.
Bạn cần chuẩn bị một bo mạch Arduino và cảm biến siêu âm...
Lập trình Arduino
#include <Arduino.h>
void setup() {
pinMode(13, OUTPUT);
}
void loop() {
digitalWrite(13, HIGH);
delay(1000);
digitalWrite(13, LOW);
delay(1000);
}