I’m new to this forum and the world of Arduino.
I’m trying to control a BLDC hub motor using arduino and ESC.
The parts I use are:
and arduino nano.
I have set the connection between ESC and the nano like in the attached pic and the code is something I found on the internet, (pretty simple. When I read the actual class method, it set the default values to 1000-2000 when 1500 is natural point and then basically the idea is to send value over 1500 for forward and under 1500 for backward).
My problem is that the motor is NOT moving in both directions on the same run.
One interesting issue I’ve found is, if I set the speed below 200 (esc.setSpeed(150) and then I shutting down the ESC and starting again, it will CHANGE direction! It happen everytime I shut down and start.
If the value is over 200 then it keep moving the same direction after restart. I couldn’t figure out why it does that.
I’ve also uploaded the data sheet for the ESC.
I’ll appreciate any help as I’m trying to solve this for two weeks already…
The code is
/* This example shows how to use an ESC controller that can go
- forward and backard