Arduinoとブラシレスモーター、キャリブレーションしてちゃんと動かす。

↑のようなやつ。ブラシレスモーターは動かすのが難しいが、高回転、ブラシがないのでブラシの摩耗がない。しかし、キャリブレーションに手こずったので下記動画を参照ください。ちなみに、ネジはM2.6でした。
動作の様子とキャリブレーションの方法
作り方
参考サイト:https://dronesandrovs.wordpress.com/2012/11/24/how-to-control-a-brushless-motor-esc-with-arduino/↑より接続の様子。

This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <Servo.h> | |
Servo esc; | |
int throttlePin = 0; | |
void setup() | |
{ | |
esc.attach(9); | |
Serial.begin(9600); | |
} | |
void loop() | |
{ | |
int throttle = analogRead(throttlePin); | |
throttle = map(throttle, 0, 1023, 0, 179); | |
Serial.println(throttle); | |
esc.write(throttle); | |
} |
Post a Comment