Nuvoton
/
NuMaker-mbed-PWM1_DCservo
NuMaker PWM1 drive +5V DC servo motor
Diff: main.cpp
- Revision:
- 4:cae45e2ca73a
- Parent:
- 0:68283046ceea
- Child:
- 7:cd68421d2a50
--- a/main.cpp Thu Dec 15 11:11:02 2016 +0800 +++ b/main.cpp Thu Dec 22 15:18:23 2016 +0800 @@ -1,7 +1,11 @@ // NuMaker-PFM-NUC472 : PWM1 output to drive DC servo motor #include "mbed.h" +#if defined(TARGET_NUMAKER_PFM_NUC472) PwmOut pwm1(PF_10); // PWM1 pinname +#elif defined(TARGET_NUMAKER_PFM_M453) +PwmOut pwm1(PC_7); +#endif int main() {