반응형 실드1 아두이노 DC모터 움직이기 ●배터리연결빨간 + 검정 - ● #include #include byte INBYTE;SoftwareSerial BTSerial(3, 2); //Connect HC-06 TX,RXAF_DCMotor motor1(1);AF_DCMotor motor2(3); void setup() { Serial.begin(9600); // set up Serial library at 9600 bps Serial.println("Motor test!"); BTSerial.begin(9600);//블루투스 연결 // turn on motor motor1.setSpeed(200); motor2.setSpeed(200); motor1.run(RELEASE); motor2.run(RELEASE);} void loop() { uin.. 2016. 1. 5. 이전 1 다음 반응형