KRAI 2017
/
ESC_test
esc test kontrol atas
main.cpp
- Committer:
- Najib_irvani
- Date:
- 2016-09-25
- Revision:
- 0:7388487b63fb
- Child:
- 1:8b6c35986de0
File content as of revision 0:7388487b63fb:
#include "mbed.h" #include "esc.h" ESC edf(PC_6,20); Serial pc(USBTX,USBRX); float max = 0.5; float pwm; int main() { pc.baud(9600); edf.setThrottle(pwm); edf.pulse(); while(1) { for (pwm = 0; pwm <max; pwm+=0.01){ edf.setThrottle(pwm); edf.pulse(); wait_ms(70); } } }