Brushless motor control with Arduino UNO

Hi guys,

First post and first time Arduino user. I am trying to use 2 brushless motors with ecs for each one with a remote control unit from an old rc car.

I have not seen anyone try this and am not sure what I am doing.
Here are the pins I am using and what they are connected to:

pin A0 - input from R/C receiver
+5v - power to R/C receiver
GND - to GND R/C receiver
pin 5 -white to Ecs1
pin 6 -red to ecs1
pin 9 -white to ecs2
pin 10 -red to ecs2

Here is my code:

#include <Stepper.h>

#define STEPS 100

Stepper stepper_left(STEPS, 5, 6);
Stepper stepper_right(STEPS, 10, 11);
int sensorPin = A0;
int sensorValue = 0;
int previous = 0;

void setup()
{
stepper_left.setSpeed(30);
stepper_right.setSpeed(30);

}

void loop()
{
sensorValue = analogRead(sensorPin);
int val = analogRead(0)
|analogRead(0)|
stepper_left.step(val - previous);
stepper_right.step(val - previous);
previous = val;
}

I am getting the, void value not ignored as it ought to be at:
stepper_left.step(val - previous);

I am not sure what the problem is. Any help would be appreciated.

A rc ESC expects a signal just like a rc servo, so you should use the servo library.

Connect the black wire from the ESC to ground on your Arduino and the white or yellow wire to the pin on your Arduino that you chose.

Don't connect the red wire to the Arduino, it is 5 Volt that is used to poer a rc receiver

Hello, ( Im one of those who have tried that in the past and it worked fine )

Probably you are messing with wrong wiring. Definately the red is wrong. You shoud use common ground between receiver and ESC