Skip to content

Commit f8d5353

Browse files
uopdate PwmOut examples links
1 parent d2e1c9a commit f8d5353

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/api/io/PwmOut.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,18 +15,18 @@ Use the PwmOut interface to control the frequency and duty cycle of a PWM signal
1515

1616
This code example uses the default period of 0.020s and ramps the duty cycle from 0% to 100% in increments of 10%.
1717

18-
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed_example/code/PwmOut_HelloWorld/)](https://os.mbed.com/teams/mbed_example/code/PwmOut_HelloWorld/file/10bf740dc758/main.cpp)
18+
[![View code](https://www.mbed.com/embed/?url=https://github.com/ARMmbed/mbed-os-examples-docs_only/blob/master/APIs_Drivers/PwmOut_ex_3/)](https://github.com/ARMmbed/mbed-os-examples-docs_only/blob/master/APIs_Drivers/PwmOut_ex_3/main.cpp)
1919

2020
## PwmOut code examples
2121

2222
### Example one
2323

2424
This code example sets the period in seconds and the duty cycle as a percentage of the period in floating point (range: 0 to 1). The effect of this code snippet will be to blink LED2 over a four-second cycle, 50% on, for a pattern of two seconds on, two seconds off.
2525

26-
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed_example/code/PwmOut_ex_1/)](https://os.mbed.com/teams/mbed_example/code/PwmOut_ex_1/file/3b6d08ebe2b0/main.cpp)
26+
[![View code](https://www.mbed.com/embed/?url=https://github.com/ARMmbed/mbed-os-examples-docs_only/blob/master/APIs_Drivers/PwmOut_ex_1/)](https://github.com/ARMmbed/mbed-os-examples-docs_only/blob/master/APIs_Drivers/PwmOut_ex_1/main.cpp)
2727

2828
### Example two
2929

3030
The following example does the same thing, but instead of specifying the duty cycle as a relative percentage of the period, it specifies it as an absolute value in seconds. In this case we have a four-second period and a two-second duty cycle, meaning the LED will be on for two seconds and off for two seconds.
3131

32-
[![View code](https://www.mbed.com/embed/?url=https://os.mbed.com/teams/mbed_example/code/PwmOut_ex_2/)](https://os.mbed.com/teams/mbed_example/code/PwmOut_ex_2/file/cab93cb2f242/main.cpp)
32+
[![View code](https://www.mbed.com/embed/?url=https://github.com/ARMmbed/mbed-os-examples-docs_only/blob/master/APIs_Drivers/PwmOut_ex_2/)](https://github.com/ARMmbed/mbed-os-examples-docs_only/blob/master/APIs_Drivers/PwmOut_ex_2/main.cpp)

0 commit comments

Comments
 (0)