I have a Raspberry Pi 2 model B. I would like to be able to control a motor with a regulator and PI4J.
I put the black cable to a ground pin and the PWM pin to pin 26. I've worked with servos before, so I tried to start the motors like a servo. It didn't work.
The ESCs: Kontronik CYBEC 40-6-12
The motors are Brushless: I'm sorry but I don't know what make.
public static void move(int power) throws InterruptedException
{
System.out.println("MOVE_ENG");
Gpio.wiringPiSetup();
SoftPwm.softPwmCreate(26, 0, 50);
SoftPwm.softPwmWrite(26, power);
}
code
public static void move(int power) throws InterruptedException{ System.out.println("MOVE_ENG"); Gpio.wiringPiSetup(); SoftPwm.softPwmCreate(26, 0, 50); SoftPwm.softPwmWrite(26, power); }code