Important changes to forums and questions
All forums and questions are now archived. To start a new conversation or read the latest updates go to forums.mbed.com.
10 years ago.
Brushless ESC How to arm?
Hi there,
Is there any code sample to drive brushless ESC with armimg on LPC1768.
P21 is pwm out pin. I have checked this code http://mbed.org/users/MatteoT/code/ESC/ but it does not include how to arm.
Thanks in advance
OK. The given library and with my code works together.
ESC esc1(p21); ESC esc2(p22);
Serial pc(USBTX, USBRX); tx, rx
int main() {
pc.baud(19200); char c; int var = 0; esc1 = 0.5; esc2 = 0.5;
while(1) { c = pc.getc(); if (c == 'u') { if (var < 100) var++; } else if (c == 'd') { if (var > 0) var
posted by Mscson Mscson 10 Apr 2014; } else if (c == 'r') var = 0; else if (c == 'p') var = 90; esc1.setThrottle(((float)var)/100); printf("%i\r\n", var); esc1.pulse(); esc2.pulse(); wait_ms(20); 20ms is the default period of the ESC pwm } }