Arduino signal converter

Hi,
I'm trying to connect an ESC to this drone's board, however, it only accepts brushed motors. I want to know if it's possible to use the Arduino to convert the signal from the mosfets to the signal that the ESC accepts. I created this code below but it didn't work correctly

#include <Servo.h>

#define ESC_PIN 9

Servo esc;

void setup() 
{
  esc.attach(ESC_PIN,  1000, 2000);
  esc.write(0);
  delay(2000);
  pinMode(A0, INPUT); 
}

void loop() 
{
  int pwmValue = pulseIn(A0, HIGH);  
  pwmValue = constrain(pwmValue, 0, 255);  
  int motorSpeed = map(pwmValue, 0, 255, 0, 180); 
  esc.write(motorSpeed);  
}

What esc. and what drone board?
Normally no difference between brushless or brushed signal requirements, just servo signal.

1 Like

Hello ausente0

Welcome to the best Arduino Forum ever :slight_smile:

What does that mean in detail?

This may give you some idea's

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.