File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -19,13 +19,13 @@ float value = 0.75;
19
19
int main () {
20
20
#if defined(TARGET_FF_ARDUINO)
21
21
PwmOut pwm (D9);
22
- int period_us = 40000 ; // allows to test various periods
22
+ int period_ms = 10 ;
23
23
24
- pwm.period_us (period_us );
24
+ pwm.period_ms (period_ms );
25
25
pwm.write (value);
26
26
27
27
float result = floor (pwm.read () * 100 + 0.5 ) / 100 ; // round it to 0.xx
28
- printf (" PWM period = %dus with duty cycle: %d%%\n " , period_us , (int ) (result * 100 ));
28
+ printf (" PWM period = %dms with duty cycle: %d%%\n " , period_ms , (int ) (result * 100 ));
29
29
30
30
notify_completion (result == value ? true : false );
31
31
#elif defined(TARGET_LPC1768) || defined(TARGET_LPC2368) || defined(TARGET_LPC11U24) || defined(TARGET_LPC4088) || defined(TARGET_LPC2460)
You can’t perform that action at this time.
0 commit comments