So let me start over, and make it all clear
This esc and motor have been used before with a matching bought remote controll,
I'm using my joystick and want to programm it from scratch.
I am using arduino Uno to programm my esc and to use my motor,
I got joystick to control it,
all i want is to control the motor speed, with my joystick (just a joystick, NOT a transmitter controller).
I got no idea how to make it work,
I'm using 1000kv motor with 40A esc and 1450mA 3s battery,
This is MY ESC:
This is the ESC MANUAL:
My CONNECTIONS:
all i connect is my 3s lipo battery of 1450mA, I connect the Black esc plug to arduino gnd and the White plug to digital 6 leg.
This is My PROGRAMM:
#include<Servo.h>
Servo esc;
const int Y_pin = 1;
void setup() {
esc.attach(6);
esc.writeMicroseconds(1000);
Serial.begin(9600);
}
void loop()
{
int val;
Serial.print(" analogRead: ");
Serial.println(analogRead(Y_pin));
val=analogRead(Y_pin);
val=map(val,515,1023,1000,2000);
esc.writeMicroseconds(val);
Serial.print("Motor Throttle :");
Serial.println(val);
delay(1000);
}
I dont know if 1000 and 2000 are good values, I took them from programm I saw on the internet.
After I compile this programm to my arduino, This is the serial monitor:
WITHOUT TOUCHING the joystick (Middle position):
analogRead: 515
Motor Throttle :1000
Joystick moved up(Max position):
analogRead: 1023
Motor Throttle :2000
Not using Minimum position of analogRead 0,
I want the motor to do nothing when i dont touch it so, my minimum speed(0) is the middle.
When I first go for Middle position (analog read 515) and then I connect the battery,
The esc makes : 1 middle length beep and then 1 short beep and nothing after,
something like "Too To".
When I first go for MAX position (analog read 1023) and then I connect the battery,
The esc makes : All different kinds of beeps, and if I move it to Middle position back (analog read 515) it does 2 beeps and then nothing.
My Joystick connections are fine the problem is with this programm and beeps,
waiting for your comments...