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.
main.cpp@0:c17ba8658b70, 2018-11-22 (annotated)
- Committer:
- Pichoman
- Date:
- Thu Nov 22 01:42:38 2018 +0000
- Revision:
- 0:c17ba8658b70
- Child:
- 1:e69573a4c0d3
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
Pichoman | 0:c17ba8658b70 | 1 | #include "mbed.h" |
Pichoman | 0:c17ba8658b70 | 2 | |
Pichoman | 0:c17ba8658b70 | 3 | PwmOut PWM1(PTB0); |
Pichoman | 0:c17ba8658b70 | 4 | PwmOut led(LED1); |
Pichoman | 0:c17ba8658b70 | 5 | |
Pichoman | 0:c17ba8658b70 | 6 | int main() |
Pichoman | 0:c17ba8658b70 | 7 | { |
Pichoman | 0:c17ba8658b70 | 8 | PWM1.period(0.03); |
Pichoman | 0:c17ba8658b70 | 9 | PWM1.write(0.60); |
Pichoman | 0:c17ba8658b70 | 10 | |
Pichoman | 0:c17ba8658b70 | 11 | led.period(0.03); |
Pichoman | 0:c17ba8658b70 | 12 | led.write(0.90); |
Pichoman | 0:c17ba8658b70 | 13 | while(1); |
Pichoman | 0:c17ba8658b70 | 14 | } |