아두이노 첫걸음 15 ㅣ BLDC 모터

#include <Servo.h> Servo BLDC; void setup() { BLDC.attach(8); BLDC.writeMicroseconds(1200); //initial speed Serial.begin(9600); } void loop() { int val; val= analogRead(A0); val= map(val, 0, 1023,1000,1500); Serial.println(val) ; BLDC.writeMicroseconds(val); //...

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

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