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@1:e5e994163bee, 2019-02-06 (annotated)
- Committer:
- kaushalpkk
- Date:
- Wed Feb 06 17:56:24 2019 +0000
- Revision:
- 1:e5e994163bee
- Parent:
- 0:d1fc4eddceab
SB lecture 3/ PWM analogin example
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| chris | 0:d1fc4eddceab | 1 | #include "mbed.h" |
| chris | 0:d1fc4eddceab | 2 | |
| kaushalpkk | 1:e5e994163bee | 3 | PwmOut s1(LED1); |
| kaushalpkk | 1:e5e994163bee | 4 | PwmOut s2(LED2); |
| chris | 0:d1fc4eddceab | 5 | |
| chris | 0:d1fc4eddceab | 6 | AnalogIn p1(p19); |
| chris | 0:d1fc4eddceab | 7 | AnalogIn p2(p20); |
| chris | 0:d1fc4eddceab | 8 | |
| chris | 0:d1fc4eddceab | 9 | int main() { |
| chris | 0:d1fc4eddceab | 10 | while(1) { |
| chris | 0:d1fc4eddceab | 11 | s1=p1; |
| chris | 0:d1fc4eddceab | 12 | s2=p2; |
| chris | 0:d1fc4eddceab | 13 | wait(0.1); |
| chris | 0:d1fc4eddceab | 14 | } |
| chris | 0:d1fc4eddceab | 15 | } |