아두이노 첫걸음 14 | 서보모터

#include Servo myServo1 ; // create object Servo myServo2 ; void setup() { myServo1.attach(9) ; myServo2.attach(10) ; delay(1000) ; } void loop() { for (int j=0 ; j =0 ; m-- ) { myServo1.write(m) ; // m is the angle myServo2.write(m) ; delay(50) ; } }...

아두이노 첫걸음 10 | DC 모터 L298N

// 1 DC motor void setup() { pinMode(7, OUTPUT) ; pinMode(8, OUTPUT) ; pinMode(9, OUTPUT) ; // Speed contorl pin } void loop() { // one direction digitalWrite(7, HIGH) ; digitalWrite(8, LOW) ; analogWrite(9, 250) ; // Speed delay(3000) ; // opposite direction...