So i recently bought a brushless motor, an ESC and 8 NiMH batteries (1.2 V each). I used glue gun to connect the connectors to the wires and made sure the metal parts touched. I connected the 3 pins of the BLDC to the ESC and i connected the signal pin of the ESC to the arduino digital pin 8. I connected the arduino analog input 0 to the 3.3V on the arduino. And i then ran the following code
`#include <Servo.h>
Servo esc;
void setup() {
// put your setup code here, to run once:
esc.attach(8);
esc.writeMicroseconds(1000);
Serial.begin(9600);
}
void loop() {
// put your main code here, to run repeatedly:
int val;
val = analogRead(A0);
val = map(val, 0, 1023, 1000, 2000);
esc.writeMicroseconds(val);
}`
This code was to test if the ESC works. The main endgame is to make a self-driving car somewhere in the future, all from scratch.
My problem is that after i connect the 8 NiMH batteries to the two power pins of the ESC, the ESC doesnt initialize. I dont know if the ESC is busted because this thing is new. I dont know if its because I used hot glue for the connectors or if its because i need a potentiometer or what. Some help would be much appreciated.