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 MotorLab3Code
main.cpp@1:5b2bc7ec7b14, 2019-01-31 (annotated)
- Committer:
- Loganlp
- Date:
- Thu Jan 31 00:39:41 2019 +0000
- Revision:
- 1:5b2bc7ec7b14
- Parent:
- 0:cb571e42343c
- Child:
- 2:060a86df835f
Finalized Lab 1 Code;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| rjs718 | 0:cb571e42343c | 1 | #include "mbed.h" |
| rjs718 | 0:cb571e42343c | 2 | #include <iostream> |
| rjs718 | 0:cb571e42343c | 3 | |
| rjs718 | 0:cb571e42343c | 4 | AnalogIn AI_in(PTB0); |
| rjs718 | 0:cb571e42343c | 5 | PwmOut PWM_out(PTE20); |
| rjs718 | 0:cb571e42343c | 6 | |
| Loganlp | 1:5b2bc7ec7b14 | 7 | |
| Loganlp | 1:5b2bc7ec7b14 | 8 | |
| rjs718 | 0:cb571e42343c | 9 | |
| rjs718 | 0:cb571e42343c | 10 | int main() { |
| rjs718 | 0:cb571e42343c | 11 | PWM_out.period(.05); |
| rjs718 | 0:cb571e42343c | 12 | while(1) { |
| Loganlp | 1:5b2bc7ec7b14 | 13 | PWM_out.write(AI_in.read()); |
| Loganlp | 1:5b2bc7ec7b14 | 14 | wait(.05); |
| rjs718 | 0:cb571e42343c | 15 | } |
| rjs718 | 0:cb571e42343c | 16 | } |