배송 |
---|
상품 정보 | 가격 | 삭제 |
---|---|---|
아두이노 모터 드라이버 L293D 쉴드 / Arduino Motor Shield | ||
TOTAL PRICE(수량) 0 |
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 |
#include <SoftwareSerial.h>
#include <AFMotor.h> // L293D 모터 드라이브 라이브러리
AF_DCMotor motor_1(1); // 모터 1 객체
void setup() {
motor_1.setSpeed(255); // 모터 1 속도 설정
motor_1.run(RELEASE); // 모터 1 돌리지 않는 상태
}
void loop() {
// 모터 1
motor_1.run(FORWARD); // 정방향으로 회전
delay(1000);
motor_1.run(RELEASE); // 쉬기
delay(1000);
motor_1.run(BACKWARD); // 역방향 회전
delay(1000);
motor_1.run(RELEASE); // 쉬기
delay(1000);
} |
cs |
글읽기 권한이 없습니다.
19세 미만의 미성년자는 출입을 금합니다.
성인인증하기17,000원