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.
PE_09_12_19_AnalogOUT.cpp@0:f7cdcc52aab5, 2019-12-09 (annotated)
- Committer:
- besam
- Date:
- Mon Dec 09 17:41:23 2019 +0000
- Revision:
- 0:f7cdcc52aab5
- Child:
- 1:50841e877319
1;
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| besam | 0:f7cdcc52aab5 | 1 | include "mbed.h" |
| besam | 0:f7cdcc52aab5 | 2 | |
| besam | 0:f7cdcc52aab5 | 3 | AnalogOut Aout(p18); // Kopfhörer |
| besam | 0:f7cdcc52aab5 | 4 | AnalogIn pot1(p19); |
| besam | 0:f7cdcc52aab5 | 5 | |
| besam | 0:f7cdcc52aab5 | 6 | int main() { |
| besam | 0:f7cdcc52aab5 | 7 | while(1) { |
| besam | 0:f7cdcc52aab5 | 8 | Aout = pot1.read(); // Lautstärke |
| besam | 0:f7cdcc52aab5 | 9 | wait_us(1000); // Frequenz |
| besam | 0:f7cdcc52aab5 | 10 | Aout = 0; |
| besam | 0:f7cdcc52aab5 | 11 | wait_us(1000); |
| besam | 0:f7cdcc52aab5 | 12 | } |
| besam | 0:f7cdcc52aab5 | 13 | } |