Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed
main.cpp@3:798a084f105a, 2016-11-10 (annotated)
- Committer:
- imihalj
- Date:
- Thu Nov 10 17:45:08 2016 +0000
- Revision:
- 3:798a084f105a
- Parent:
- 2:549ed5b0a8d0
- Child:
- 4:986fa54b04b5
vjezba4
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
imihalj | 0:c32036656bb4 | 1 | #include "mbed.h" |
imihalj | 2:549ed5b0a8d0 | 2 | PwmOut PWM1(p21); |
imihalj | 3:798a084f105a | 3 | PwmOut PWM2(p22); |
imihalj | 0:c32036656bb4 | 4 | int main() |
imihalj | 0:c32036656bb4 | 5 | { |
imihalj | 2:549ed5b0a8d0 | 6 | PWM1.period(0.010); // set PWM period to 10 ms |
imihalj | 2:549ed5b0a8d0 | 7 | PWM1=0.8; // set duty cycle to 80% |
imihalj | 3:798a084f105a | 8 | PWM2=0.2; // set duty cycle to 20% |
imihalj | 0:c32036656bb4 | 9 | } |