Paso 4: Añadir control de Arduino programa
Tenemos que cargar el programa que controla el Motor de ESC
-Código:
/*Coded by Marjan Olesch Sketch from Insctructables.com Open source - do what you want with this code! */ #include <servo.h> int value = 0; // set values you need to zero Servo firstESC, secondESC; //Create as much as Servoobject you want. //You can controll 2 or more Servos at the same time void setup() { firstESC.attach(9); // attached to pin 9 I just do this with 1 Servo Serial.begin(9600); // start serial at 9600 baud } void loop() { //First connect your ESC WITHOUT Arming. Then Open Serial and follo Instructions firstESC.writeMicroseconds(value); if(Serial.available()) value = Serial.parseInt(); // Parse an Integer from Serial }